Escolar Documentos
Profissional Documentos
Cultura Documentos
Engenharia
Disciplina: Cálculo Numérico
Aula 12
𝑥 𝑦
2 3
3 4.9
4 7.1
5 8.95
𝑥 𝑦
2 3
3 4.9
4 7.1
5 8.95
O erro entre o valor coletado ( 𝑦𝑖 ) e o valor da função
aproximada g(𝑥𝑖 ) tem que ser o menor possível.
Erro = 𝑦𝑖 − g(𝑥𝑖 )
Função modular
𝑛 2
𝑖=1 𝑦𝑖 − g(𝑥𝑖 )
𝑛 2
𝑖=1 𝑦𝑖 − a𝑥𝑖 − 𝑏
Derivada parcial igual a zero.
𝑛 2
𝑖=1 𝑦𝑖 − a𝑥𝑖 − 𝑏
𝜕 𝜕
=0 = 0 erro mínimo.
𝜕𝑎 𝜕𝑏
𝜕 𝜕 2
= 𝑦𝑖 − a𝑥𝑖 − 𝑏
𝜕𝑎 𝜕𝑎
𝜕
=2∙ 𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −𝑥𝑖 = 0
𝜕𝑎
0
𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −𝑥𝑖 =
2
𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −𝑥𝑖 = 0
𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −𝑥𝑖 = 0
− 𝑥𝑖 ∙ 𝑦𝑖 + 𝑎 𝑥𝑖 2 +𝑏 𝑥𝑖 = 0
𝑎 𝑥𝑖 2 +𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝜕 𝜕 2
= 𝑦𝑖 − a𝑥𝑖 − 𝑏
𝜕𝑏 𝜕𝑏
𝜕
=2∙ 𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −1 = 0
𝜕𝑏
0
𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −1 =
2
𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −1 = 0
𝑦𝑖 − a𝑥𝑖 − 𝑏 ∙ −1 = 0
− 𝑦𝑖 + 𝑎 𝑥𝑖 + 𝑏=0
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖
A determinação dos valores de 𝑎 e 𝑏 é obtida por:
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖
𝑥 𝑦 𝑥∙𝑦 𝑥2
𝑥 𝑦
2 3 6 4
2 3
3 4.9 14.7 9
3 4.9
4 7.1 28.4 16
4 7.1
5 8.95 44.75 25
5 8.95
14 23.95 93.85 54
𝑥𝑖 𝑦𝑖 𝑥𝑖 𝑦𝑖 𝑥𝑖 2
𝑥 𝑦 𝑥∙𝑦 𝑥2
2 3
3 4.9
4 7.1
5 8.95
A determinação dos valores de 𝑎 e 𝑏 é obtida por:
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖
𝑥 𝑦 𝑥∙𝑦 𝑥2
𝑎 ∙ 54 + 𝑏 ∙ 14 = 93.85 2 3 6 4
2.005 ∙ 14 + 4 ∙ 𝑏 = 23.95
4 ∙ 𝑏 = 23.95 − 28.07
−4.12
𝑏= = −1.03
4
𝑦 = 2.005𝑥 − 1.03
𝑦 = 2.005𝑥 − 1.03
𝑥 𝑦
2 3
3 4.9
4 7.1
5 8.95
𝑦 = 2.005𝑥 − 1.03
𝑥 𝑦
2 3
3 4.9
4 7.1
5 8.95
𝑦 = 2.005𝑥 − 1.03
𝑥 𝑦
2 3
3 4.9
4 7.1
5 8.95
Obtenha a lei da função que mais se aproxima dos dados da
seguinte tabela.
𝑥 𝑦
1 7
3 0.5
4 −2.1
6 −8.1
Os dados da tabela se
aproximam da lei função:
𝑦 = 𝑎𝑥 + 𝑏
A determinação dos valores de 𝑎 e 𝑏 é obtida por:
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖
𝑥 𝑦 𝑥 𝑦 𝑥∙𝑦 𝑥2
1 7 1 7
3 0.5 3 0.5
4 −2.1 4 −2.1
6 −8.1 6 −8.1
A determinação dos valores de 𝑎 e 𝑏 é obtida por:
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖
𝑥 𝑦 𝑥∙𝑦 𝑥2 𝑥 𝑦 𝑥∙𝑦 𝑥2
1 7 1 7 7 1
3 0.5 3 0.5 1.5 9
4 −2.1 4 −2.1 −8.4 16
6 −8.1 6 −8.1 −48.6 36
14 −2.7 −48.5 62
𝑥𝑖 𝑦𝑖 𝑥𝑖 𝑦𝑖 𝑥𝑖 2
A determinação dos valores de 𝑎 e 𝑏 é obtida por:
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖
𝑥 𝑦 𝑥∙𝑦 𝑥2
𝑎 ∙ 62 + 𝑏 ∙ 14 = −48.5
1 7 7 1
𝑎 ∙ 14 + 4 ∙ 𝑏 = −2.7
3 0.5 1.5 9
4 −2.1 −8.4 16
𝑎 ∙ 62 + 𝑏 ∙ 14 = −48.5 ∙ (4)
6 −8.1 −48.6 36
𝑎 ∙ 14 + 4 ∙ 𝑏 = −2.7 ∙ (−14)
14 −2.7 −48.5 62
𝑥𝑖 𝑦𝑖 𝑥𝑖 𝑦𝑖 𝑥𝑖 2
248 ∙ 𝑎 + 56 ∙ 𝑏 = −194
−196 ∙ 𝑎 − 56 ∙ 𝑏 = 37.8
248 ∙ 𝑎 + 56 ∙ 𝑏 = −194
−196 ∙ 𝑎 − 56 ∙ 𝑏 = 37.8
52 ∙ 𝑎 = −156.2
𝑎 = −3.0038
14 ∙ (−3.0038) + 4 ∙ 𝑏 = −2.7
−42.0532 + 4 ∙ 𝑏 = −2.7
4 ∙ 𝑏 = 39.3532
𝑏 = 9.8383
𝑦 = −3.0038 + 9.8383
Obtenha a lei da função que mais se aproxima dos dados da
seguinte tabela.
𝑥 𝑦
−3 −7.4
−2 −5.8
−1 −4.6
1 −1.3
4 2.8
Os dados da tabela se
aproximam da lei função:
𝑦 = 𝑎𝑥 + 𝑏
Obtenha a lei da função que mais se aproxima dos dados da
seguinte tabela.
𝑥 𝑦 𝑥∙𝑦 𝑥2 𝑥 𝑦 𝑥∙𝑦 𝑥2
−3 −7.4 −3 −7.4 22.2 9
−2 −5.8 −2 −5.8 11.6 4
−1 −4.6 −1 −4.6 4.6 1
1 −1.3 1 −1.3 −1.3 1
4 2.8 4 2.8 11.2 16
−1 −16.3 48.3 31
𝑥𝑖 𝑦𝑖 𝑥𝑖 𝑦𝑖 𝑥𝑖 2
A determinação dos valores de 𝑎 e 𝑏 é obtida por:
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖 𝑥 𝑦 𝑥∙𝑦 𝑥2
−3 −7.4 22.2 9
𝑎 ∙ 31 + 𝑏 ∙ (−1) = 48.3 −2 −5.8 11.6 4
𝑎 ∙ (−1) + 5 ∙ 𝑏 = −16.3 −1 −4.6 4.6 1
1 −1.3 −1.3 1
𝑎 ∙ 31 + 𝑏 ∙ (−1) = 48.3 ∙ (5) 4 2.8 11.2 16
𝑎 ∙ (−1) + 5 ∙ 𝑏 = −16.3 −1 −16.3 48.3 31
𝑥𝑖 𝑦𝑖 𝑥𝑖 𝑦𝑖 𝑥𝑖 2
155 ∙ 𝑎 − 5 ∙ 𝑏 = 241.5
−1 ∙ 𝑎 + 5 ∙ 𝑏 = −16.3
A determinação dos valores de 𝑎 e 𝑏 é obtida por:
𝑎 𝑥𝑖 2 + 𝑏 𝑥𝑖 = 𝑥𝑖 ∙ 𝑦𝑖
𝑎 𝑥𝑖 + 𝑛 ∙ 𝑏 = 𝑦𝑖 𝑥 𝑦 𝑥∙𝑦 𝑥2
−3 −7.4 22.2 9
𝑎 ∙ 31 + 𝑏 ∙ (−1) = 48.3 −2 −5.8 11.6 4
𝑎 ∙ (−1) + 5 ∙ 𝑏 = −16.3 −1 −4.6 4.6 1
1 −1.3 −1.3 1
𝑎 ∙ 31 + 𝑏 ∙ (−1) = 48.3 ∙ (5) 4 2.8 11.2 16
𝑎 ∙ (−1) + 5 ∙ 𝑏 = −16.3 −1 −16.3 48.3 31
𝑥𝑖 𝑦𝑖 𝑥𝑖 𝑦𝑖 𝑥𝑖 2
155 ∙ 𝑎 − 5 ∙ 𝑏 = 241.5
−1 ∙ 𝑎 + 5 ∙ 𝑏 = −16.3
155 ∙ 𝑎 − 5 ∙ 𝑏 = 241.5
−1 ∙ 𝑎 + 5 ∙ 𝑏 = −16.3
154 ∙ 𝑎 = 225.2
𝑎 = 1.4623
𝑎 ∙ (−1) + 5 ∙ 𝑏 = −16.3
1.4623 ∙ (−1) + 5 ∙ 𝑏 = −16.3
5 ∙ 𝑏 = −14.8377
𝑏 = −2.96754
𝑦 = 1.4623𝑥 − 2.96754