Este item é muito parecido com o item a , já que estamos em busca do polinômio de grau 2 2 \boldsymbol{2} 2 que minimiza o erro quadrático . Logo, estamos buscando o polinômio pelo Método dos Mínimos Quadrados .
Os pontos dados são:
( − 2 , 0 ) ( − 2 , 0 ) (-2,0) ( − 2 , 0 ) , ( − 1 , − a ) ( − 1 , − a ) (-1,-a) ( − 1 , − a ) , ( 0 , 0 ) ( 0 , 0 ) (0,0) ( 0 , 0 ) , ( 1 , 1 ) ( 1 , 1 ) (1,1) ( 1 , 1 ) ( 2 , 2 a ) ( 2 , 2 a ) (2,2a) ( 2 , 2 a )
Como queremos um polinômio de grau 2 2 2 2 , temos que:
g 1 ( x ) = 1 g 1 ( x ) = 1 g_1(x)=1 g 1 ( x ) = 1 , g 2 ( x ) = x g 2 ( x ) = x g_2(x)=x g 2 ( x ) = x e g 3 ( x ) = x 2 g 3 ( x ) = x 2 g_3(x)=x^2 g 3 ( x ) = x 2
De forma que a função é dada por:
y ( x ) = a 1 ⋅ 1 + a 2 ⋅ x + a 3 ⋅ x 2 y ( x ) = a 1 ⋅ 1 + a 2 ⋅ x + a 3 ⋅ x 2 y(x)=a_1\cdot 1 + a_2 \cdot x + a_3 \cdot x^2 y ( x ) = a 1 ⋅ 1 + a 2 ⋅ x + a 3 ⋅ x 2
Para aplicar o Método dos Mínimos Quadrados, vamos substituir os vetores formados pelas coordenadas dos pontos na relação acima:
⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ 0 − a 0 1 2 a ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ └ ┘ − − − − − y [ 0 − a 0 1 2 a ] ⎵ y \underbrace{\begin{bmatrix}0\\-a\\0\\1\\2a\end{bmatrix}}_{\displaystyle{y}} y ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ 0 − a 0 1 2 a ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ = = = = a 1 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ 1 1 1 1 1 ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ └ ┘ − − − 1 a 1 [ 1 1 1 1 1 ] ⎵ 1 a_1 \underbrace{\begin{bmatrix}1\\1\\1\\1\\1\end{bmatrix}}_{\displaystyle{1}} a 1 1 ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ 1 1 1 1 1 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ + + + + a 2 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ − 2 − 1 0 1 2 ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ └ ┘ − − − − − x a 2 [ − 2 − 1 0 1 2 ] ⎵ x a_2 \underbrace{\begin{bmatrix}-2\\-1\\0\\1\\2\end{bmatrix}}_{\displaystyle{x}} a 2 x ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ − 2 − 1 0 1 2 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ + + + + a 3 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ( − 2 ) 2 ( − 1 ) 2 0 2 1 2 2 2 ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ └ ┘ − − − − − − − x 2 a 3 [ ( − 2 ) 2 ( − 1 ) 2 0 2 1 2 2 2 ] ⎵ x 2 a_3 \underbrace{\begin{bmatrix}(-2)^2\\(-1)^2\\0^2\\1^2\\2^2\end{bmatrix}}_{\displaystyle{x^2}} a 3 x 2 ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ ( − 2 ) 2 ( − 1 ) 2 0 2 1 2 2 2 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤
Resolvendo os quadrados:
⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ 0 − a 0 1 2 a ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ [ 0 − a 0 1 2 a ] \begin{bmatrix}0\\-a\\0\\1\\2a\end{bmatrix} ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ 0 − a 0 1 2 a ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ = = = = a 1 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ 1 1 1 1 1 ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ a 1 [ 1 1 1 1 1 ] a_1 \begin{bmatrix}1\\1\\1\\1\\1\end{bmatrix} a 1 ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ 1 1 1 1 1 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ + + + + a 2 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ − 2 − 1 0 1 2 ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ a 2 [ − 2 − 1 0 1 2 ] a_2 \begin{bmatrix}-2\\-1\\0\\1\\2\end{bmatrix} a 2 ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ − 2 − 1 0 1 2 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤ + + + + a 3 ⎡ ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ 4 1 0 1 4 ⎤ ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ a 3 [ 4 1 0 1 4 ] a_3 \begin{bmatrix}4\\1\\0\\1\\4\end{bmatrix} a 3 ⎣ ⎢ ⎢ ⎢ ⎢ ⎡ 4 1 0 1 4 ⎦ ⎥ ⎥ ⎥ ⎥ ⎤
Novamente, o vetor de elementos iguais a 1 1 1 1 aparece pois não há uma incógnita acompanhando o parâmetro a 1 a 1 a_1 a 1 .
Precisamos agora encontrar os produtos internos para preencher o seguinte sistema:
⎡ ⎣ ⎢ < 1 , 1 > < x , 1 > < x 2 , 1 > < 1 , x > < x , x > < x 2 , x > < 1 , x 2 > < x , x 2 > < x 2 , x 2 > ⎤ ⎦ ⎥ [ < 1 , 1 > < 1 , x > < 1 , x 2 > < x , 1 > < x , x > < x , x 2 > < x 2 , 1 > < x 2 , x > < x 2 , x 2 > ] \begin{bmatrix} \left<1,1\right> &\left<1,x\right> & \left<1,x^2\right> \\ \left<x,1\right> & \left<x,x\right> & \left<x,x^2\right> \\\left<x^2,1\right> &\left<x^2,x\right> & \left<x^2,x^2\right> \end{bmatrix} ⎣ ⎡ ⟨ 1 , 1 ⟩ ⟨ x , 1 ⟩ ⟨ x 2 , 1 ⟩ ⟨ 1 , x ⟩ ⟨ x , x ⟩ ⟨ x 2 , x ⟩ ⟨ 1 , x 2 ⟩ ⟨ x , x 2 ⟩ ⟨ x 2 , x 2 ⟩ ⎦ ⎤ ⋅ ⋅ \cdot ⋅ ⎡ ⎣ ⎢ a 1 a 2 a 3 ⎤ ⎦ ⎥ [ a 1 a 2 a 3 ] \begin{bmatrix}a_1\\a_2\\a_3 \end{bmatrix} ⎣ ⎡ a 1 a 2 a 3 ⎦ ⎤ = = = = ⎡ ⎣ ⎢ < 1 , y > < x , y > < x 2 , y > ⎤ ⎦ ⎥ [ < 1 , y > < x , y > < x 2 , y > ] \begin{bmatrix}{\color{#EF8722} {\left<1,y\right>}}\\{\color{#9E3ACC} {\left<x,y\right>}}\\{\color{#C90000} {\left<x^2,y\right>}} \end{bmatrix} ⎣ ⎡ ⟨ 1 , y ⟩ ⟨ x , y ⟩ ⟨ x 2 , y ⟩ ⎦ ⎤
Os produtos internos do lado esquerdo serão os mesmos encontrados no item a , já que a coordenada x x x x de todos os pontos é a mesma. Temos:
< 1 , 1 > = 5 < 1 , 1 > = 5 \left<1,1\right>=5 ⟨ 1 , 1 ⟩ = 5 , < 1 , x > = 0 < 1 , x > = 0 \left<1,x\right>=0 ⟨ 1 , x ⟩ = 0 , < 1 , x 2 > = 10 < 1 , x 2 > = 10 \left<1,x^2\right>=10 ⟨ 1 , x 2 ⟩ = 1 0 , < x , x > = 10 < x , x > = 10 \left<x,x\right>=10 ⟨ x , x ⟩ = 1 0 , < x , x 2 > = 0 < x , x 2 > = 0 \left<x,x^2\right>=0 ⟨ x , x 2 ⟩ = 0 e < x 2 , x 2 > = 34 < x 2 , x 2 > = 34 \left<x^2,x^2\right>=34 ⟨ x 2 , x 2 ⟩ = 3 4
Calculando os produtos internos para o lado direito da equação:
< 1 , y > = ∑ 1 5 ( 1 i ⋅ y i ) = 0 − a + 0 + 1 + 2 a = a + 1 < 1 , y > = ∑ 1 5 ( 1 i ⋅ y i ) = 0 − a + 0 + 1 + 2 a = a + 1 {\color{#EF8722} {\left<1,y\right>}}=\displaystyle\sum_1^5(1_i\cdot y_i)=0-a+0+1+2a={\color{#EF8722} {a+1}} ⟨ 1 , y ⟩ = 1 ∑ 5 ( 1 i ⋅ y i ) = 0 − a + 0 + 1 + 2 a = a + 1
< x , y > = ∑ 1 5 ( x i ⋅ y i ) = 0 + a + 0 + 1 + 4 a = 5 a + 1 < x , y > = ∑ 1 5 ( x i ⋅ y i ) = 0 + a + 0 + 1 + 4 a = 5 a + 1 {\color{#9E3ACC} {\left<x,y\right>}}=\displaystyle\sum_1^5(x_i\cdot y_i)=0+a+0+1+4a={\color{#9E3ACC} {5a+1}} ⟨ x , y ⟩ = 1 ∑ 5 ( x i ⋅ y i ) = 0 + a + 0 + 1 + 4 a = 5 a + 1
< x 2 , y > = ∑ 1 5 ( x 2 i ⋅ y i ) = 0 − a + 0 + 1 + 8 a = 7 a + 1 < x 2 , y > = ∑ 1 5 ( x i 2 ⋅ y i ) = 0 − a + 0 + 1 + 8 a = 7 a + 1 {\color{#C90000} {\left<x^2,y\right>}}=\displaystyle\sum_1^5(x^2_i\cdot y_i)=0-a+0+1+8a={\color{#C90000} {7a+1}} ⟨ x 2 , y ⟩ = 1 ∑ 5 ( x i 2 ⋅ y i ) = 0 − a + 0 + 1 + 8 a = 7 a + 1
Substituindo todos os valores no sistema, ficamos com:
⎡ ⎣ ⎢ 5 0 10 0 10 0 10 0 34 ⎤ ⎦ ⎥ [ 5 0 10 0 10 0 10 0 34 ] \begin{bmatrix} 5 & 0 & 10 \\ 0 & 10 & 0 \\ 10 & 0 & 34 \end{bmatrix} ⎣ ⎡ 5 0 1 0 0 1 0 0 1 0 0 3 4 ⎦ ⎤ ⋅ ⋅ \cdot ⋅ ⎡ ⎣ ⎢ a 1 a 2 a 3 ⎤ ⎦ ⎥ [ a 1 a 2 a 3 ] \begin{bmatrix}a_1\\a_2\\a_3 \end{bmatrix} ⎣ ⎡ a 1 a 2 a 3 ⎦ ⎤ = = = = ⎡ ⎣ ⎢ a + 1 5 a + 1 7 a + 1 ⎤ ⎦ ⎥ [ a + 1 5 a + 1 7 a + 1 ] \begin{bmatrix}{\color{#EF8722} {a+1}}\\{\color{#9E3ACC} {5a+1}}\\{\color{#C90000} {7a+1}} \end{bmatrix} ⎣ ⎡ a + 1 5 a + 1 7 a + 1 ⎦ ⎤
Agora precisamos resolver esse sistema linear . Começando pela segunda equação, temos:
10 a 2 = 5 a + 1 10 a 2 = 5 a + 1 10a_2=5a+1 1 0 a 2 = 5 a + 1 ⇒ ⇒ \Rightarrow ⇒ a 2 = 5 a + 1 10 a 2 = 5 a + 1 10 {\color{#20AC5B} {a_2=\dfrac{5a+1}{10}}} a 2 = 1 0 5 a + 1
Analisando a primeira equação:
5 a 1 + 10 a 3 = a + 1 5 a 1 + 10 a 3 = a + 1 5a_1+10a_3=a+1 5 a 1 + 1 0 a 3 = a + 1 ⇒ ⇒ \Rightarrow ⇒ a 1 = a + 1 − 10 a 3 5 a 1 = a + 1 − 10 a 3 5 a_1=\dfrac{a+1-10a_3}{5} a 1 = 5 a + 1 − 1 0 a 3 ⇒ ⇒ \Rightarrow ⇒ a 1 = a + 1 5 − 2 a 3 a 1 = a + 1 5 − 2 a 3 a_1=\dfrac{a+1}{5}-2a_3 a 1 = 5 a + 1 − 2 a 3
Na terceira equação, temos:
10 a 1 + 34 a 3 = 7 a + 1 10 a 1 + 34 a 3 = 7 a + 1 10a_1+34a_3=7a+1 1 0 a 1 + 3 4 a 3 = 7 a + 1
Substituindo a 1 a 1 a_1 a 1 nessa equação:
10 ( a + 1 5 − 2 a 3 ) + 34 a 3 = 7 a + 1 10 ( a + 1 5 − 2 a 3 ) + 34 a 3 = 7 a + 1 10\left( \dfrac{a+1}{5}-2a_3 \right)+34a_3=7a+1 1 0 ( 5 a + 1 − 2 a 3 ) + 3 4 a 3 = 7 a + 1
2 a + 2 − 20 a 3 + 34 a 3 = 7 a + 1 2 a + 2 − 20 a 3 + 34 a 3 = 7 a + 1 2a+2-20a_3+34a_3=7a+1 2 a + 2 − 2 0 a 3 + 3 4 a 3 = 7 a + 1 ⇒ ⇒ \Rightarrow ⇒ a 3 = 5 a − 1 14 a 3 = 5 a − 1 14 {\color{#1C9BBF} {a_3=\dfrac{5a-1}{14}}} a 3 = 1 4 5 a − 1
Agora, para descobrir a 1 a 1 a_1 a 1 , basta substituir a 3 a 3 a_3 a 3 na segunda equação:
a 1 = a + 1 5 − 2 ( 5 a − 1 14 ) a 1 = a + 1 5 − 2 ( 5 a − 1 14 ) a_1=\dfrac{a+1}{5}-2\left( \dfrac{5a-1}{14} \right) a 1 = 5 a + 1 − 2 ( 1 4 5 a − 1 ) ⇒ ⇒ \Rightarrow ⇒ a 1 = − 18 a + 12 35 a 1 = − 18 a + 12 35 {\color{#F8719A} {a_1=\dfrac{-18a+12}{35}}} a 1 = 3 5 − 1 8 a + 1 2
Tendo todos os coeficientes, podemos montar a parábola que minimiza os erros quadráticos:
y ( x ) = ( − 18 a + 12 35 ) ⋅ 1 + ( 5 a + 1 10 ) x + ( 5 a − 1 14 ) x 2 y ( x ) = ( − 18 a + 12 35 ) ⋅ 1 + ( 5 a + 1 10 ) x + ( 5 a − 1 14 ) x 2 y(x)=\left({\color{#F8719A} {\dfrac{-18a+12}{35}}}\right)\cdot 1+\left({\color{#20AC5B} {\dfrac{5a+1}{10}}}\right)x+\left ({\color{#1C9BBF} {\dfrac{5a-1}{14}}}\right) x^2 y ( x ) = ( 3 5 − 1 8 a + 1 2 ) ⋅ 1 + ( 1 0 5 a + 1 ) x + ( 1 4 5 a − 1 ) x 2
Agora, para descobrir o valor de a a a a , basta usarmos a informação do enunciado de que o erro precisa ser o menor possível em x = 0 x = 0 x=0 x = 0 . Vamos considerar então que a parábola passa em ( 0 , 0 ) ( 0 , 0 ) (0,0) ( 0 , 0 ) . Assim:
0 = ( − 18 a + 12 35 ) ⋅ 1 + ( 5 a + 1 10 ) 0 + ( 5 a − 1 14 ) ⋅ 0 2 0 = ( − 18 a + 12 35 ) ⋅ 1 + ( 5 a + 1 10 ) 0 + ( 5 a − 1 14 ) ⋅ 0 2 0=\left(\dfrac{-18a+12}{35}\right) \cdot 1+\left(\dfrac{5a+1}{10}\right)0+\left (\dfrac{5a-1}{14} \right)\cdot 0^2 0 = ( 3 5 − 1 8 a + 1 2 ) ⋅ 1 + ( 1 0 5 a + 1 ) 0 + ( 1 4 5 a − 1 ) ⋅ 0 2
− 18 a + 12 35 = 0 − 18 a + 12 35 = 0 \dfrac{-18a+12}{35}=0 3 5 − 1 8 a + 1 2 = 0 ⇒ ⇒ \Rightarrow ⇒ a = 2 3 a = 2 3 \boldsymbol{a=\dfrac{2}{3}} a = 3 2
Substituindo esse valor na função, ficamos com:
y ( x ) = 1 6 x 2 + 13 x 30 y ( x ) = 1 6 x 2 + 13 x 30 y(x)=\dfrac{1}{6}x^2+\dfrac{13x}{30} y ( x ) = 6 1 x 2 + 3 0 1 3 x
Esboçando o gráfico:
Resposta esperada: a = 2 3 a = 2 3 \boldsymbol{a=\dfrac{2}{3}} a = 3 2 e gráfico.