1a. Avaliaçāo de Cálculo Numérico - Turma E - 29/06/2023

Atenção: Utilize k=0 ou k=1, a depender de seu RA ser par ou impar, respectivamente.
Resolva o sistema linear abaixo utilizando fatoraçāo LU com pivoteamento parcial.
\left\{\begin{array}{l} x+\left(\frac{3+k}{2+k}\right) y+(4-2 k) z=2+k \\\ (2+k) x+y=4+5 k \\\ x+\left(\frac{5+2 k}{2+k}\right) y+(4-2 k) z=2+k \end{array}\right.

Passo 1

Vou listar claramente o que o enunciado dá e o que pede. O sistema a ser resolvido (com k=0\) ou \(k=1\)) é: \[\begin{cases} x+\left(\dfrac{3+k}{2+k}\right)y+(4-2k)z=2+k,\\[6pt] (2+k)x+y=4+5k,\\[6pt] x+\left(\dfrac{5+2k}{2+k}\right)y+(4-2k)z=2+k. \end{cases}
O enunciado pede: resolver este sistema usando fatoração LU\] com pivoteamento parcial. Como não foi informado qual \(k escolher, vou resolver explicitamente para os dois casos possíveis: k=0 e k=1. Em cada caso farei: montar A e b, aplicar pivoteamento parcial durante a eliminação (registrando a permutação P), obter L e U tais que PA=LU, e então resolver Ly=Pb e Ux=y por substituição direta.]

Passo 2

Caso k=0. Primeiro escrevo a matriz dos coeficientes A e o vetor b.
A=\begin{pmatrix} 1 & \dfrac{3}{2} & 4\\[6pt] 2 & 1 & 0\\[6pt] 1 & \dfrac{5}{2} & 4 \end{pmatrix},\qquad b=\begin{pmatrix}2\\[4pt]4\\[4pt]2\end{pmatrix}.
Agora faço pivoteamento parcial na coluna 1: entre as entradas |1|,|2|,|1| o maior é 2 (linha 2). Portanto troco a linha 1 com a linha 2. Essa troca é registrada por uma matriz de permutação P. Após a troca a matriz aumentada fica:
\begin{pmatrix} 2 & 1 & 0 & \vline & 4\\[4pt] 1 & \dfrac{3}{2} & 4 & \vline & 2\\[4pt] 1 & \dfrac{5}{2} & 4 & \vline & 2 \end{pmatrix}.]

Passo 3

Continuo a eliminação (coluna 1). Calculo os multiplicadores para zerar abaixo do pivô 2:
\ell_{21}=\dfrac{1}{2},\qquad \ell_{31}=\dfrac{1}{2}.
Aplico as operações de linhas:
Linha2 := Linha2 - \ell_{21} \timesLinha1,
Linha3 := Linha3 - \ell_{31} \timesLinha1.
Fazendo as contas:
\text{Linha 2: }\; \begin{pmatrix}1-\tfrac{1}{2}\cdot2,\; \tfrac{3}{2}-\tfrac{1}{2}\cdot1,\; 4-\tfrac{1}{2}\cdot0\end{pmatrix} = \begin{pmatrix}0,\;1,\;4\end{pmatrix},
\text{b\_2: } 2-\tfrac{1}{2}\cdot4=0.
\text{Linha 3: }\; \begin{pmatrix}1-\tfrac{1}{2}\cdot2,\; \tfrac{5}{2}-\tfrac{1}{2}\cdot1,\;4-\tfrac{1}{2}\cdot0\end{pmatrix}=\begin{pmatrix}0,\;2,\;4\end{pmatrix},
\text{b\_3: } 2-\tfrac{1}{2}\cdot4=0.
A matriz (após eliminar coluna 1) é:
\begin{pmatrix} 2 & 1 & 0 & \vline & 4\\[4pt] 0 & 1 & 4 & \vline & 0\\[4pt] 0 & 2 & 4 & \vline & 0 \end{pmatrix}.]

Passo 4

Agora escolho pivô na coluna 2 entre as linhas 2 e 3: os valores absolutos são |1| e |2|, o maior é 2 (linha 3). Faço troca de linha 2 com linha 3 (registro mais uma permutação em P). Após a troca:
\begin{pmatrix} 2 & 1 & 0 & \vline & 4\\[4pt] 0 & 2 & 4 & \vline & 0\\[4pt] 0 & 1 & 4 & \vline & 0 \end{pmatrix}.
O multiplicador para zerar a entrada (3,2) é
\ell_{32}=\dfrac{1}{2}.
Aplico Linha3 := Linha3 - \ell_{32} \timesLinha2. Calculando:
\text{Linha 3: }\; \begin{pmatrix}0,\;1-\tfrac{1}{2}\cdot2,\;4-\tfrac{1}{2}\cdot4\end{pmatrix}=\begin{pmatrix}0,\;0,\;2\end{pmatrix},
\text{b\_3: }0-\tfrac{1}{2}\cdot0=0.
Agora a matriz superior triangular U (já obtida) é:
U=\begin{pmatrix} 2 & 1 & 0\\[4pt] 0 & 2 & 4\\[4pt] 0 & 0 & 2 \end{pmatrix}.]

Passo 5

Construindo P e L para o caso k=0. As trocas de linha realizadas (primeiro 1↔2, depois 2↔3) resultam em
P=\begin{pmatrix} 0 & 1 & 0\\[4pt] 0 & 0 & 1\\[4pt] 1 & 0 & 0 \end{pmatrix},
pois PA coloca as linhas originais na ordem (2,3,1). Os multiplicadores encontrados são \ell_{21}=\tfrac{1}{2},\; \ell_{31}=\tfrac{1}{2},\; \ell_{32}=\tfrac{1}{2}. Assim a matriz L (com diagonais 1) é
L=\begin{pmatrix} 1 & 0 & 0\\[4pt] \tfrac{1}{2} & 1 & 0\\[4pt] \tfrac{1}{2} & \tfrac{1}{2} & 1 \end{pmatrix},
e de fato vale PA=LU.]

Passo 6

Agora resolvo Ly=Pb\). Primeiro calculo \(Pb\). O vetor \(b\) original é \(\begin{pmatrix}2\\[4pt]4\\[4pt]2\end{pmatrix}\). Aplicando \(P\) (trocas) temos \[Pb=\begin{pmatrix}4\\[4pt]2\\[4pt]2\end{pmatrix}.
Resolver Ly=Pb por substituição direta (forward substitution):
\begin{cases} y_1 = 4,\\[4pt] y_2 = 2 - \tfrac{1}{2}y_1 = 2 - \tfrac{1}{2}\cdot4 = 0,\\[4pt] y_3 = 2 - \tfrac{1}{2}y_1 - \tfrac{1}{2}y_2 = 2 - 2 - 0 = 0. \end{cases}
Logo (y= \begin{pmatrix}4\\[4pt]0\\[4pt]0\end{pmatrix}].]

Passo 7

Agora resolvo Ux=y\) por substituição regressiva (back substitution). A matriz \(U\) é \[U=\begin{pmatrix} 2 & 1 & 0\\[4pt] 0 & 2 & 4\\[4pt] 0 & 0 & 2 \end{pmatrix}.
Escrevendo as equações:
\begin{cases} 2x_1 + 1x_2 + 0x_3 = 4,\\[4pt] 2x_2 + 4x_3 = 0,\\[4pt] 2x_3 = 0. \end{cases}
Da última: x_3=0\]. Da segunda: \(x_2=0. Da primeira: 2x_1=4 então x_1=2. Portanto, para k=0 a solução é
(x,y,z)=(2,0,0).]

Passo 8

Agora faço o caso k=1. Primeiro escrevo A e b.
A=\begin{pmatrix} 1 & \dfrac{4}{3} & 2\\[6pt] 3 & 1 & 0\\[6pt] 1 & \dfrac{7}{3} & 2 \end{pmatrix},\qquad b=\begin{pmatrix}3\\[4pt]9\\[4pt]3\end{pmatrix}.
Pivoteamento parcial na coluna 1: os módulos |1|,|3|,|1| indicam que o maior pivô é 3 (linha 2). Troco linha 1 com linha 2. A matriz aumentada passa a ser
\begin{pmatrix} 3 & 1 & 0 & \vline & 9\\[4pt] 1 & \dfrac{4}{3} & 2 & \vline & 3\\[4pt] 1 & \dfrac{7}{3} & 2 & \vline & 3 \end{pmatrix}.]

Passo 9

Eliminação coluna 1: multiplicadores
\ell_{21}=\dfrac{1}{3},\qquad \ell_{31}=\dfrac{1}{3}.
Aplicando as operações:
Linha2 := Linha2 - \tfrac{1}{3} \timesLinha1 e Linha3 := Linha3 - \tfrac{1}{3} \timesLinha1.
Cálculos:
\text{Linha 2: } \begin{pmatrix}0,\; \tfrac{4}{3}-\tfrac{1}{3}\cdot1,\; 2-0\end{pmatrix}=\begin{pmatrix}0,\;1,\;2\end{pmatrix},\qquad b_2=3-\tfrac{1}{3}\cdot9=0.
\text{Linha 3: } \begin{pmatrix}0,\; \tfrac{7}{3}-\tfrac{1}{3}\cdot1,\;2-0\end{pmatrix}=\begin{pmatrix}0,\;2,\;2\end{pmatrix},\qquad b_3=3-\tfrac{1}{3}\cdot9=0.
A matriz fica
\begin{pmatrix} 3 & 1 & 0 & \vline & 9\\[4pt] 0 & 1 & 2 & \vline & 0\\[4pt] 0 & 2 & 2 & \vline & 0 \end{pmatrix}.]

Passo 10

Pivô na coluna 2 entre linhas 2 e 3: |1| e |2|, maior é 2 (linha 3). Troco linha 2 com linha 3. Então
\begin{pmatrix} 3 & 1 & 0 & \vline & 9\\[4pt] 0 & 2 & 2 & \vline & 0\\[4pt] 0 & 1 & 2 & \vline & 0 \end{pmatrix}.
O multiplicador para zerar (3,2) é \ell_{32}=\tfrac{1}{2}. Faço Linha3 := Linha3 - \tfrac{1}{2} \timesLinha2:
\text{Linha 3: } \begin{pmatrix}0,\;0,\;2-\tfrac{1}{2}\cdot2\end{pmatrix}=\begin{pmatrix}0,\;0,\;1\end{pmatrix},\qquad b_3=0-\tfrac{1}{2}\cdot0=0.
Então a U obtida é
U=\begin{pmatrix} 3 & 1 & 0\\[4pt] 0 & 2 & 2\\[4pt] 0 & 0 & 1 \end{pmatrix}.]

Passo 11

Matriz P resultante (mesmas trocas: primeiro 1↔2 depois 2↔3) é
P=\begin{pmatrix} 0 & 1 & 0\\[4pt] 0 & 0 & 1\\[4pt] 1 & 0 & 0 \end{pmatrix}.
Os multiplicadores foram \ell_{21}=\tfrac{1}{3},\; \ell_{31}=\tfrac{1}{3},\; \ell_{32}=\tfrac{1}{2}. Assim
L=\begin{pmatrix} 1 & 0 & 0\\[4pt] \tfrac{1}{3} & 1 & 0\\[4pt] \tfrac{1}{3} & \tfrac{1}{2} & 1 \end{pmatrix},
e vale PA=LU.]

Passo 12

Resolver Ly=Pb\) no caso \(k=1\). O vetor \(b\) original é \(\begin{pmatrix}3\\[4pt]9\\[4pt]3\end{pmatrix}\). Aplicando \(P\) (mesmas trocas) obtemos \[Pb=\begin{pmatrix}9\\[4pt]3\\[4pt]3\end{pmatrix}.
Forward substitution:
\begin{cases} y_1=9,\\[4pt] y_2=3-\tfrac{1}{3}y_1 = 3 - \tfrac{1}{3}\cdot9 = 0,\\[4pt] y_3=3 - \tfrac{1}{3}y_1 - \tfrac{1}{2}y_2 = 3 - 3 - 0 = 0. \end{cases}
Logo (y= \begin{pmatrix}9\\[4pt]0\\[4pt]0\end{pmatrix}].]

Passo 13

Resolver Ux=y\) por back substitution com \[U=\begin{pmatrix} 3 & 1 & 0\\[4pt] 0 & 2 & 2\\[4pt] 0 & 0 & 1 \end{pmatrix},\qquad y=\begin{pmatrix}9\\[4pt]0\\[4pt]0\end{pmatrix}.
Equações:
\begin{cases} 3x_1 + x_2 = 9,\\[4pt] 2x_2 + 2x_3 = 0,\\[4pt] 1x_3 = 0. \end{cases}
Da última: x_3=0\]. Da segunda: \(2x_2=0 então x_2=0. Da primeira: 3x_1=9 então x_1=3. Portanto, para k=1 a solução é
(x,y,z)=(3,0,0).]

Resposta

Para k=0: (x,y,z)=(2,0,0)
Para k=1: (x,y,z)=(3,0,0)

Exercícios relacionados