I'm trying to discuss a system of equations that depends on a parameter $k$ using the method Gauss-Jordan but the more I calculate the more entangled it becomes. While the solution in the book seems so easy and simple.
\begin{equation} \begin{cases} kx-y-z+3t=0\\2x-kz+2t=k+4\\kx+y+t=-k\\x+y-z=2 \end{cases} \end{equation} My attempt is:
\begin{vmatrix} k & -1& -1& 3& 0 \\2 & 0& -k& 2& k+4 \\k & 1& 0& 1& -k \\ 1 & 1 & -1& 0& 2\end{vmatrix} $ \longrightarrow$ changing the order of first and fourth row \begin{vmatrix} 1 & 1& -1& 0& 2 \\2 & 0& -k& 2& k+4 \\k & 1& 0& 1& -k \\ k & -1 & -1& 3& 0\end{vmatrix}
$\xrightarrow{R_2 \to -2R_1+R_2,\hspace{2mm}R_3 \to -kR_1+R_3,\hspace{2mm}R_4 \to -kR_1+R_4}$
\begin{vmatrix} 1 & 1& -1& 0& 2 \\0 & -2& 2-k& 2& k \\0 & 1-k& k& 1& -3k \\ 0 & -1-k & -1+k& 3& -2k\end{vmatrix}
$\xrightarrow{R_2 \to R_2*(-1/2)}$
\begin{vmatrix} 1 & 1& -1& 0& 2 \\0 & 1& (k-2)/2& -1& -k/2 \\0 & 1-k& k& 1& -3k \\ 0 & -1-k & -1+k& 3& -2k\end{vmatrix}
$\xrightarrow{R_1 \to -R_2+R_1,\hspace{2mm}R_3 \to -(1-k)R_2+R_3,\hspace{2mm}R_4 \to -(-1-k)R_2+R_4}$
\begin{vmatrix} 1 & 0& -k/2& 1& (k+4)/2 \\0 & 1& (k-2)/2& -1& -k/2 \\0 & 0& (k^2-k+2)/2& -k& (-k^2-5k)/2 \\ 0 & 0 & (k^2+k-4)/2& 2-k& (-k^2-5k)/2\end{vmatrix}
$\xrightarrow{R_3 \to R_3*(2/(k^2-k+2)),\hspace{2mm}R_4 \to R_4*(2/(k^2+k-4))}$
\begin{vmatrix} 1 & 0& -k/2& 1& (k+4)/2 \\0 & 1& (k-2)/2& -1& -k/2 \\0 & 0& 1& -2k/(k^2-k+2)& (-k^2-5k)/(k^2-k+2) \\ 0 & 0 & 1& 2(2-k)/(k^2+k-4)& (-k^2-5k)/(k^2+k-4)\end{vmatrix}
$\xrightarrow{R_1 \to R_3*(k/2)+R_1,\hspace{2mm}R_2 \to -(k-2/2)R_3,\hspace{2mm}R_4 \to -R_3+R_4}$
\begin{vmatrix} 1 & 0& 0& -k+2/k^2-k+2& -(k^2-k-1)/(k^2-k+2) \\0 & 1& 0& -k-2/k^2-k+2& (2k^2-6k)/(k^2-k+2) \\0 & 0& 1& -2k/(k^2-k+2)& (-k^2-5k)/(k^2-k+2) \\ 0 & 0 & 0& 8(k-1)^2/(k^2-k+2)(k^2+k-4)& (2k^3+4k^2-30k)/(k^2-k+2)(k^2+k-4)\end{vmatrix}
$\xrightarrow{R_4 \to R_48(k-1)^2/(k^2-k+2)(k^2+k-4)}$
\begin{vmatrix} 1 & 0& 0& -k+2/k^2-k+2& -(k^2-k-1)/(k^2-k+2) \\0 & 1& 0& -k-2/k^2-k+2& (2k^2-6k)/(k^2-k+2) \\0 & 0& 1& -2k/(k^2-k+2)& (-k^2-5k)/(k^2-k+2) \\ 0 & 0 & 0& 1& 2k(k^2+2k-15)/8(k-1)^2 \end{vmatrix}
$\xrightarrow{R_1 \to R_4*(k-2/k^2-k+2)+R_1,\hspace{2mm}R_2 \to R_4*(k+2/k^2-k+2)+R_2,\hspace{2mm}R_3 \to R_4*(2k/k^2-k+2)+R_3}$
\begin{vmatrix} 1 & 0& 0& 0& (-6k^4+8*k^3-22k^2+36k+8)/8(k-1)^2*(k^2-k+2) \\0 & 1& 0& 0& (-14k^4+88*k^3-134k^2-12k)/8(k-1)^2*(k^2-k+2) \\0 & 0& 1& 0& (-4k^4-16*k^3+12k^2-40k)/8(k-1)^2*(k^2-k+2) \\ 0 & 0 & 0& 1& 2k(k^2+2k-15)/8(k-1)^2 \end{vmatrix}