Escolar Documentos
Profissional Documentos
Cultura Documentos
1
O Paraquedista
2
O Paraquedista
Altura do Salto
Distância ao Alvo
3
O Paraquedista
1 1250 25
2 1000 15
3 750 10
4
O Paraquedista
1 1250 25
2 1000 15
3 750 10
5
O Paraquedista
6
O Paraquedista
7
O Paraquedista
• A função é
2
y = 0,00004 x − 0,05 x + 25
8
O Paraquedista
y1 = a ( x1 ) 2 + b( x1 ) + c → x12a + x1b + c = y1
y2 = a ( x2 ) 2 + b( x2 ) + c → x 22a + x2b + c = y2
y3 = a ( x3 ) 2 + b( x3 ) + c → x 32a + x3b + c = y3
9
O Paraquedista
• O sistemas resultante é
2
x 1 x1 1 a y1
2
x 2 x2 1 b = y2
x
2
3 x3 1 c y3
10
O Paraquedista
• O processo realizado chama-se interpolação!!
• Interpolação: método que permite construir um novo conjunto de dados a
partir de um conjunto discreto de dados pontuais previamente conhecidos.
• Permite construir uma função que aproximadamente se "encaixe" nestes dados
pontuais, conferindo-lhes, então, a continuidade desejada.
• Outra aplicação da interpolação é a aproximação de funções complexas por
funções mais simples.
Exemplo de interpolação
Exemplo de interpolação
polinomial de grau superior a
linear.
1. 11
Interpolação
i xi yi
0 x0 y0
1 x1 y1
2 x2 y2
3 x3 y3
4 x4 y4
12
Interpolação
n n −1 2
Pn ( x ) = cn x + cn −1 x + ... + c2 x + c1 x + c0
14
Interpolação
• Conceito de Interpolação
Seja a função y = f ( x ), dada pela tabela anterior.
Deseja - se determinar f ( x ) sendo que x ∈ ( x0 , x4 ) e
x ≠ xi , i = 0, 1, 2, 3, 4.
15
Interpolação
Interpolação
Polinômio de
Gregory-
Newton
16
Polinômios Interpoladores
17
Polinômios interpoladores
18
O que determina o grau n do
Interpolação
polinômio interpolador?
Construir o polinômio interpolador consiste em encontrar os
coeficientes cn , cn −1 ,..., c2 , c1 , c0
Para : P1 ( x0 ) = c1 x0 + c0 = y0
i xi yi
0 x0 y0
P1 ( x1 ) = c1 x1 + c0 = y1
1 x1 y1 x0 1 c1 y0
x 1 c = y
1 0 1
Interpolação Linear
20
Interpolação
Para : P2 ( x0 ) = c2 x02 + c1 x0 + c0 = y0
i xi yi
0 x0 y0 P2 ( x1 ) = c2 x12 + c1 x1 + c0 = y1
1 x1 y1
2 x2 y2
P2 ( x2 ) = c2 x22 + c1 x2 + c0 = y2
x02 x0 1 c2 y0
2
x1 x1 1 c1 = y1
x22
x2 1 c0 y2
Interpolação Quadrática
21
Para um polinômio de grau n
interpolação
precisa-se de n+1 pontos.
Pn ( x0 ) = cn x0n + cn −1 x0n −1 + + c2 x02 + c1 x0 + c0 = y0
i Para : x i yi
Pn ( x1 ) = cn x1n + cn −1 x1n −1 + + c2 x12 + c1 x1 + c0 = y1
0 x0 y0
Pn ( x2 ) = cn x2n + cn −1 x2n −1 + + c2 x22 + c1 x2 + c0 = y2
1 x1 y1
2 x2 y2
Pn ( xn −1 ) = cn xnn−1 + cn −1 xnn−−11 + + c2 xn2−1 + c1 xn −1 + c0 = yn −1
. . .
2,3 0,361728
2,4 0,380211
2,5 0,397940
2,6 0,414973
23
Exercício
• Solução:
24
Exercício
25
Polinômio de Lagrange
26
Polinômio de Lagrange
27
Polinômio de Lagrange
n n
x − xj
Ln ( x ) = ∑ yi ∏
i =0 j =0 xi − x j
j ≠i
n n
x − xj
Ln ( x ) = ∑ yi ∏
i =0 j =0 xi − x j
j ≠i
29
Polinômio de Lagrange
30
Polinômio de Lagrange
• Para a fórmula expandida tem-se.
1 1 1
x0 − x1 x0 − x2 x0 − xn
Ln ( x0 ) = y0 × × × ... ×
x0 − x1 x0 − x2 x0 − xn
0
x0 − x0 x0 − x2 x0 − xn
+ y1 × × × ... ×
x1 − x0 x1 − x2 x1 − xn
0
x0 − x0 x0 − x1 x0 − xn −1
... + yn × × × ... ×
xn − x0 xn − x1 xn − xn −1
Ln ( x0 ) = y0 31
Polinômio de Lagrange
• Para a fórmula expandida tem-se.
0
xn − x1 xn − x2 xn − xn
Ln ( xn ) = y0 × × × ... ×
x0 − x1 x0 − x2 x0 − xn
0
xn − x0 xn − x2 xn − xn
+ y1 × × × ... ×
x1 − x0 x1 − x2 x1 − xn
1 1 1
xn − x0 xn − x1 xn − xn −1
... + yn × × × ... ×
xn − x0 xn − x1 xn − xn −1
Ln ( xn ) = yn 32
Polinômio de Lagrange
33
O Paraquedista
1 1250 25
2 1000 15
3 750 10
34
O Paraquedista
x − x1 x − x 2 x − x0 x − x 2 x − x0 x − x1
L( x) = y 0 . . + y1 . . + y2 . .
x0 − x1 x0 − x 2 x1 − x0 x1 − x 2 x 2 − x0 x 2 − x1
850 − 1000 850 − 750 850 − 1250 850 − 750 850 − 1250 850 − 1000
L(850) = 25. . + 15. . + 10. .
1250 − 1000 1250 − 750 1000 − 1250 1000 − 750 750 − 1250 750 − 1000
(−3) 1 8 2 4 3 48 24
L(850) = 25. . + 15. . + 10. . = −3 + + = 11,4
5 5 5 5 5 5 5 5
35
Exercício
xi f(xi)
1 4
2 15
3 40
4 85
36
Exercício
• Solução:
x − x1 x − x 2 x − x3 x − x 0 x − x 2 x − x3
L( x) = y 0 . . . + y1 . . . +
x0 − x1 x0 − x 2 x0 − x3 x1 − x0 x1 − x 2 x1 − x3
x − x0 x − x1 x − x3 x − x0 x − x1 x − x 2
y2 . . . + y3 . . .
x 2 − x0 x 2 − x1 x 2 − x3 x3 − x0 x3 − x1 x3 − x 2
37
Exercício
• Solução:
38
Estudo do Algoritmo do Método de Lagrange
39
Polinômio de Newton
40
Polinômio de Newton
41
Polinômio de Newton
42
Polinômio de Newton
Ordem 0 : ∆0 y i = y i
∆0 y i +1 − ∆0 y i
Ordem 1 : ∆y i =
x i +1 − xi
∆y i +1 − ∆y i
Ordem 2 : ∆2 y i =
x i + 2 − xi
n −1 n −1
∆ y − ∆ yi
Ordem n : ∆n y i = i +1
x i + n − xi
43
Polinômio de Newton
i xi yi
0 0,3 3,09
1 1,5 17,25
2 2,1 25,41
44
Polinômio de Newton
2 2,1 25,41 -- --
i xi yi
0 0,0 1,008
1 0,2 1,064
2 0,3 1,125
3 0,5 1,343
4 0,6 1,512
46
Polinômio de Newton
∆0 yi +1 − ∆0 yi
∆yi =
xi +1 − xi
0 0,0 1,008
1 0,2 1,064 -
2 0,3 1,125 - -
3 0,5 1,343 - - -
4 0,6 1,512 - - - -
47
Polinômio de Newton
i xi yi=Ordem 0 Ordem 1 Ordem 2 Ordem 3 Ordem 4
4 0,6 1,512 - - - -
∆0 y1 − ∆0 y0 1,064 − 1,008
∆y0 = = = 0,28
x1 − x0 0,2 − 0,0
∆0 y2 − ∆0 y1 1,125 − 1,064 ∆0 y4 − ∆0 y3 1,512 − 1,343
∆y1 = = = 0,61 ∆y3 =
x4 − x3
=
0,6 − 0,5
= 1,69
x2 − x1 0,3 − 0,2
∆0 y3 − ∆0 y2 1,343 − 1,125
∆y2 = = = 1,09
x3 − x2 0,5 − 0,3
48
Polinômio de Newton
2 ∆yi +1 − ∆yi
∆ yi =
xi + 2 − xi
4 0,6 1,512 - - - -
49
Polinômio de Newton
i xi yi=Ordem 0 Ordem 1 Ordem 2 Ordem 3 Ordem 4
4 0,6 1,512 - - - -
50
Polinômio de Newton
2 2
3 ∆ y − ∆ yi
∆ yi = i +1
xi +3 − xi
4 0,6 1,512 - - - -
51
Polinômio de Newton
i1 xi yi=Ordem 0 Ordem 1 Ordem 2 Ordem 3 Ordem 4
4 0,6 1,512 - - - -
2 2
∆ y − ∆ y0 1,6 − 1,1
∆3 y0 = 1
= =1
x3 − x0 0,5 − 0,0
2 2
∆ y − ∆ y1 2,0 − 1,6
∆3 y1 = 2
= =1
x4 − x1 0,6 − 0,2
52
Polinômio de Newton
3 3
4 ∆ y − ∆ yi
∆ yi = i +1
xi + 4 − xi
4 0,6 1,512 - - - -
53
Polinômio de Newton
i xi yi=Ordem 0 Ordem 1 Ordem 2 Ordem 3 Ordem 4
4 0,6 1,512 - - - -
4 ∆3 y1 − ∆3 y0 1,0 − 1,0
∆ y0 = = =0
x4 − x0 0,6 − 0,0
54
Polinômio de Newton
55
Polinômio de Newton
n i −1
Pn ( x ) = y0 + ∑ ∆ y0 ∏ ( x − x j )
i
i =1 j =0
Pn ( x ) = y0 + ∆y0 ( x − x0 ) + ∆2 y0 ( x − x0 )( x − x1 ) +
... + ∆n y0 ( x − x0 )( x − x1 )...( x − xn −1 )
56
Polinômio de Newton
2 2,1 25,41 -- --
n i −1
Pn ( x) = y 0 + ∑ ∆i y 0 ∏ ( x − x j )
i =1 j =0
P2 ( x) = y 0 + ∆y 0 ( x − x0 ) + ∆2 y 0 ( x − x0 )( x − x1 )
P2 (0,8) = 3,09 + 11,8.(0,8 − 0,3) + 1,0.(0,8 − 0,3).(0,8 − 1,5) = 3,09 + 5,9 − 0,35 = 8,64
57
O Paraquedista
1 1250 25
2 1000 15
3 750 10
58
O Paraquedista
i xi yi=∆0yi ∆yi ∆2yi
1 1000 15 0,02 --
2 750 10 -- --
∆0 y1 − ∆0 y0 15 − 25 − 10
∆y0 = = = = 0,04
x1 − x0 1000 − 1250 − 250
∆0 y2 − ∆0 y1 10 − 15 −5
∆y1 = = = = 0,02
x2 − x1 750 − 1000 − 250
59
O Paraquedista
n i −1
Pn ( x) = y 0 + ∑ ∆ y 0 ∏ ( x − x j )
i
i =1 j =0
Pn ( x) = y 0 + ∆y 0 ( x − x0 ) + ∆2 y 0 ( x − x0 )( x − x1 ) +
... + ∆n y 0 ( x − x0 )( x − x1 )...( x − x n −1 )
Pn (850) = 25 + 0,04.(850 − 1250) + 0,00004.(850 − 1250).(850 − 1000)
= 25 + (−16) + 2,4 = 11,4
60
Exercício
4 0,6 1,512 - - - -
61
Polinômio de Gregory-Newton
62
polinômio de gregory-newton
Interpolação
polinômio de gregory-newton
Interpolação
polinômio de gregory-newton
Interpolação
polinômio de gregory-newton
Interpolação
polinômio de gregory-newton
i xi yi
0 0,3 3,09
1 1,5 17,25
2 2,7 25,41
Interpolação
polinômio de gregory-newton
Ordem 0 : ∆0 yi = yi
Ordem 1 : ∆yi = ∆0 yi +1 − ∆0 yi
Interpolação
polinômio de gregory-newton
i xi yi
0 0,3 3,09
1 1,5 17,25
2 2,7 25,41
Interpolação
polinômio de gregory-newton
Interpolação
polinômio de gregory-newton
i xi yi
0 0,3 3,09
1 1,5 17,25
2 2,7 25,41
Interpolação
polinômio de gregory-newton
Interpolação
polinômio de gregory-newton
i xi yi
0 0,0 1,008
1 0,2 1,064
2 0,4 1,125
3 0,6 1,343
4 0,8 1,512
Interpolação
polinômio de gregory-newton
Computação Numérica
O PAraquedista
1 1250 25
2 1000 15
3 750 10
Computação Numérica
Exercícios
Computação Numérica