6. (2020-juny-1-2). Considereu el sistema d'equacions lineals següent, que depèn del paràmetre real `k`:
$$
\begin{cases} 5x+y+4z=19 \\
kx+2y+8z=28 \\
5x+y-kz=23+k \end{cases}
$$
a) Discutiu el sistema per als diferents valors del paràmetre `k`.

b) Resoleu, si és possible, el sistema per al cas `k = 0`.

    a- Matriu del sistema:
    $$
    M=\begin{pmatrix}
    5 & 1 & 4\\\
    k & 2 & 8\\\
    5 & 1 & -k
    \end{pmatrix}
    $$
    $$
    det(M)=\begin{vmatrix}
    5 & 1 & 4\\\
    k & 2 & 8\\\
    5 & 1 & -k
    \end{vmatrix}=-10k+40+4k-(40+40-k^2)= k^2-6k-40 =0 => k_1=10 \text{ i } k_2=-4
    $$
    Si `k_1 \ne 10` `i` `a_2 \ne -4 =>` Rang M = Rang M' = `3` = número de incògnites `=>` sistema compatible i determinat



    `k_1=10`
    $$
    M=\begin{pmatrix}
    5 & 1 & 4 & 19\\\
    10 & 2 & 8 & 28\\\
    5 & 1 & -10 & 33
    \end{pmatrix}
    $$
    $$
    \begin{vmatrix}
    5 & 4 \\\
    5 & -10
    \end{vmatrix}= -50-20 =-70\ne 0 => \text{rang M} = 2
    $$
    $$
    \begin{vmatrix}5 & 4 & 19\\\ 10 & 8 & 28\\\ 5 & -10 & 33 \end{vmatrix}= -700 => \text{rang M'} =3 => \text{Sistema incompatible}
    $$


    `k_2=-4`
    $$
    M=\begin{pmatrix}
    5 & 1 & 4 & 19\\\
    -4 & 2 & 8 & 28\\\
    5 & 1 & 4 & 19
    \end{pmatrix}
    $$
    $$
    \begin{vmatrix}
    5 & 1 \\\
    -4 & 2
    \end{vmatrix}= 10+4 =14\ne 0 => \text{rang M} = 2
    $$
    $$
    \begin{vmatrix}
    5 & 1 & 19\\\
    -4 & 2 & 28\\\
    5 & 1 & 19
    \end{vmatrix}=0 \text{, ja que hi ha dues files iguals} => \text{rang M'} = 2<3 \text{ (número d'incògnites) } => \text{Sistema compatible indeterminat}
    $$



    b-
    $$
    \begin{cases} 5x+y+4z=19 \\
    2y+8z=28 \\
    5x+y=23 \end{cases}
    $$

      Reordenem les equacions.
      +5x +y 0z = +23
      +5x +y +4z = +19
      0x +2y +8z = +28

      Multipliquem la 1ª equació per (-5) i ho sumem a la 2ª equació multiplicada per 5 .
      +5x +y 0z = +23
      0x 0y +20z = -20
      0x +2y +8z = +28

      Reordenem les equacions.
      +5x +y 0z = +23
      0x +2y +8z = +28
      0x 0y +20z = -20

      Multipliquem la 3ª equació per (-8) i ho sumem a la 2ª equació multiplicada per 20 .
      +5x +y 0z = +23
      0x +40y 0z = +720
      0x 0y +20z = -20

      Multipliquem la 2ª equació per (-1) i ho sumem a la 1ª equació multiplicada per 40 .
      +200x 0y 0z = +200
      0x +40y 0z = +720
      0x 0y +20z = -20

      Dividim cada equació pel coeficient de la seva incògnita.
      +x 0y 0z = +1
      0x +y 0z = +18
      0x 0y +z = -1

      SISTEMA COMPATIBLE DETERMINAT.
      Solució:
      x = +1
      y = +18
      z = -1