4. Problema de la mescla de cafè
Un comerciant vol preparar \(100\) kg d’una mescla de tres tipus de cafè, A, B i C, que costen \(6\) €/kg, \(8\) €/kg i \(10\) €/kg, respectivament. El cost total de la mescla ha de ser de \(760\) € i la quantitat de cafè A ha de ser el doble que la de cafè C. Quants quilograms cal agafar de cada tipus?
Plantejament. Siguin \(x\) els kg de cafè A, \(y\) els kg de cafè B i \(z\) els kg de cafè C. Del enunciat resulta: \begin{gather*} x+y+z=100 \\ 6x+8y+10z=760 \\ x=2z \end{gather*} Simplificant, s’obté el sistema: \[ \begin{cases} x + y + z = 100 \\ 6x + 8y + 10z = 760 \\ x – 2z = 0 \end{cases} \]
Mètode de Cramer. La matriu de coeficients és \(A=\begin{pmatrix} 1 & 1 & 1 \\ 6 & 8 & 10 \\ 1 & 0 & -2 \end{pmatrix}\) i el seu determinant (regla de Sarrus) és: \begin{align*} |A| &= \begin{vmatrix} 1 & 1 & 1 \\ 6 & 8 & 10 \\ 1 & 0 & -2 \end{vmatrix} \\ &= 1 \cdot 8 \cdot (-2) + 1 \cdot 10 \cdot 1 + 1 \cdot 6 \cdot 0 \\ &\quad – 1 \cdot 8 \cdot 1 – 1 \cdot 10 \cdot 0 – 1 \cdot 6 \cdot (-2) \\ &= (-16) + 10 + 0 – 8 – 0 – (-12) = -2 \end{align*} Com que \(|A|=-2\neq0\), el sistema és compatible determinat. Substituint cada columna pels termes independents: \begin{align*} |A_{x}| &= \begin{vmatrix} 100 & 1 & 1 \\ 760 & 8 & 10 \\ 0 & 0 & -2 \end{vmatrix} \\ &= 100 \cdot 8 \cdot (-2) + 1 \cdot 10 \cdot 0 + 1 \cdot 760 \cdot 0 \\ &\quad – 1 \cdot 8 \cdot 0 – 100 \cdot 10 \cdot 0 – 1 \cdot 760 \cdot (-2) \\ &= (-1600) + 0 + 0 – 0 – 0 – (-1520) = -80 \end{align*} \begin{align*} |A_{y}| &= \begin{vmatrix} 1 & 100 & 1 \\ 6 & 760 & 10 \\ 1 & 0 & -2 \end{vmatrix} \\ &= 1 \cdot 760 \cdot (-2) + 100 \cdot 10 \cdot 1 + 1 \cdot 6 \cdot 0 \\ &\quad – 1 \cdot 760 \cdot 1 – 1 \cdot 10 \cdot 0 – 100 \cdot 6 \cdot (-2) \\ &= (-1520) + 1000 + 0 – 760 – 0 – (-1200) = -80 \end{align*} \begin{align*} |A_{z}| &= \begin{vmatrix} 1 & 1 & 100 \\ 6 & 8 & 760 \\ 1 & 0 & 0 \end{vmatrix} \\ &= 1 \cdot 8 \cdot 0 + 1 \cdot 760 \cdot 1 + 100 \cdot 6 \cdot 0 \\ &\quad – 100 \cdot 8 \cdot 1 – 1 \cdot 760 \cdot 0 – 1 \cdot 6 \cdot 0 \\ &= 0 + 760 + 0 – 800 – 0 – 0 = -40 \end{align*} \begin{gather*} x=\frac{|A_{x}|}{|A|}=\frac{-80}{-2}=40 \\ y=\frac{|A_{y}|}{|A|}=\frac{-80}{-2}=40 \\ z=\frac{|A_{z}|}{|A|}=\frac{-40}{-2}=20 \end{gather*}
Mètode de Gauss. Escrivim la matriu ampliada i l’escalonem amb transformacions elementals per files: \[ \left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 6 & 8 & 10 & 760 \\ 1 & 0 & -2 & 0 \end{array}\right) \xrightarrow{F_2 \to \frac{F_2}{2}} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 3 & 4 & 5 & 380 \\ 1 & 0 & -2 & 0 \end{array}\right) \] \[ \left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 3 & 4 & 5 & 380 \\ 1 & 0 & -2 & 0 \end{array}\right) \xrightarrow{\substack{F_2 \to F_2 – 3F_1 \\ F_3 \to F_3 – F_1}} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 0 & 1 & 2 & 80 \\ 0 & -1 & -3 & -100 \end{array}\right) \] \[ \left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 0 & 1 & 2 & 80 \\ 0 & -1 & -3 & -100 \end{array}\right) \xrightarrow{F_3 \to F_3 + F_2} \left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 0 & 1 & 2 & 80 \\ 0 & 0 & -1 & -20 \end{array}\right) \] El sistema equivalent és: \[ \begin{cases} x + y + z = 100 \\ y + 2z = 80 \\ -z = -20 \end{cases} \] Resolent de baix cap amunt: \begin{gather*} z=\frac{-20}{-1}=20 \\ y=80 – 2 \cdot 20=40 \\ x=100 – 1 \cdot 40 – 1 \cdot 20=40 \end{gather*}
Solució: \(x=40\), \(y=40\), \(z=20\).∎
Us agrada: M'agrada S'està carregant…