Escolar Documentos
Profissional Documentos
Cultura Documentos
Calculo Numerico PDF
Calculo Numerico PDF
Clculo Numrico
UTFPR
ndices
1 NOES BSICAS SOBRE ERROS ...................................................................................1-1
1.1 ERROS...............................................................................................................................................1-1
1.2 ERROS A BSOLUTOS E RELATIVOS ................................................................................................1-1
1.2.1 Erro Absoluto..................................................................................................................................1-1
1.2.2 Erro Relativo ou Taxa de Erro ....................................................................................................1-2
1.3 ERROS DE A RREDONDAMENTO E TRUNCAMENTO.....................................................................1-2
1.3.1 Erro de Arredondamento..............................................................................................................1-2
1.3.2 Erro de Truncamento ....................................................................................................................1-2
1.4 A RITMTICA DE PONTO FLUTUANTE ...........................................................................................1-3
1.5 CONVERSO DE BASES ..................................................................................................................1-3
1.5.1 Converso da Base para a Decimal (10) ........................................................................1-3
1.5.2 Converso da Base Decimal para a (10) ........................................................................1-4
1.5.3 Exerccios: Converso de Bases..................................................................................................1-5
1.6 OPERAES DE PONTOS FLUTUANTES ........................................................................................1-7
1.6.1 Representaes...............................................................................................................................1-7
1.6.2 Exerccios........................................................................................................................................1-7
1.6.3 Exerccios complementares..........................................................................................................1-8
2 ZEROS REAIS DE FUNES REAIS .............................................................................. 2-11
2.1 INTRODUO .................................................................................................................................2-11
2.2 FASE I: ISOLAMENTO DAS RAZES...............................................................................................2-11
2.3 FASE II: REFINAMENTO - CRITRIOS DE PARADA ....................................................................2-15
2.3.1 Mtodo da Bisseco (ou Mtodo da Dicotomia) ................................................................. 2-15
2.3.2 Mtodo do Ponto Fixo (ou Mtodo da Iterao Linear ou Mtodo das Aproximaes
sucessivas).................................................................................................................................... 2-19
2.3.3 Mtodo de Newton, Newton-Raphson (ou Mtodo das Tangentes).................................... 2-27
2.3.4 Comparao entre os mtodos.................................................................................................. 2-30
3 RESOLUO DE SISTEMAS DE EQUAES LINEARES .................................... 3-32
3.1 INTRODUO .................................................................................................................................3-32
3.1.1 Forma Algbrica de S n ............................................................................................................... 3-32
3.1.2 Forma Matricial de Sn............................................................................................................... 3-32
3.1.3 Matriz Aumentada ou Matriz Completa do Sistema ............................................................. 3-32
3.1.4 Soluo do Sistema ..................................................................................................................... 3-32
3.1.5 Classificao de um Sistema Linear........................................................................................ 3-33
3.1.6 Classificao quanto ao Determinante de A.......................................................................... 3-33
3.2 M TODOS DIRETOS.......................................................................................................................3-33
3.2.1 Mtodo de Eliminao de Gauss.............................................................................................. 3-33
3.2.2 Estratgia de Pivoteamento Completo .................................................................................... 3-36
3.2.3 Refinamento de Solues........................................................................................................... 3-37
3.3 M TODOS ITERATIVOS .................................................................................................................3-39
3.3.1 Testes de parada.......................................................................................................................... 3-39
3.3.2 Mtodo de Gauss-Jacobi........................................................................................................... 3-39
3.3.3 Mtodo de Gauss-Seidel............................................................................................................ 3-42
3.3.4 Comparao entre os mtodos.................................................................................................. 3-43
3.3.5 Critrio de Sassenfeld................................................................................................................ 3-44
4 INTERPOLAO.................................................................................................................... 4-47
4.1 INTERPOLAO POLINOMIAL ......................................................................................................4-47
4.1.1 Existncia e Unicidade do Polinmio Interpolador Pn(x).................................................... 4-47
4.1.2 Forma de Lagrange.................................................................................................................... 4-48
4.1.3 Forma de Newton........................................................................................................................ 4-50
4.2 ESTUDO DE ERRO NA INTERPOLAO ........................................................................................4-52
4.2.1 Estimativa para o Erro............................................................................................................... 4-52
4.3 INTERPOLAO INVERSA : CASOS EXISTENTES..........................................................................4-54
4.3.1 Encontrar x tal que Pn ( x ) .................................................................................................. 4-54
4.3.2 Interpolao inversa................................................................................................................... 4-54
4.4 FUNES SPLINE EM INTERPOLAO.........................................................................................4-56
iii
4.4.1 Funo Spline .............................................................................................................................. 4-56
4.4.2 Spline linear interpolante.......................................................................................................... 4-57
4.4.3 Spline cbica interpolante......................................................................................................... 4-58
5 AJUSTE DE CURVAS PELO MTODO DOS MNIMOS QUADRADOS ........... 5-64
5.1 INTRODUO .................................................................................................................................5-64
5.2 CASO DISCRETO............................................................................................................................5-65
5.3 CASO CONTNUO ...........................................................................................................................5-70
5.4 FAMLIA DE FUNES NO LINEARES NOS PARMETROS .....................................................5-72
6 INTEGRAO NUMRICA ............................................................................................... 6-74
6.1 FRMULAS DE NEWTON -COTES .................................................................................................6-74
6.1.1 Regra dos Trapzios................................................................................................................... 6-74
6.1.2 Regra dos Trapzios repetida ................................................................................................... 6-76
6.1.3 Regra 1/3 de Simpson................................................................................................................. 6-77
6.1.4 Regra 1/3 de Simpson repetida................................................................................................. 6-80
7 SOLUO NUMRICA DE EQUAES DIFERENCIAIS ORDINRIAS ....... 7-83
7.1 INTRODUO .................................................................................................................................7-83
7.2 PROBLEMA DE VALOR INICIAL (PVI) .........................................................................................7-84
7.2.1 Soluo numrica de um PVI de primeira ordem ................................................................. 7-84
7.2.2 Mtodo de Euler.......................................................................................................................... 7-84
7.2.3 Mtodos de Runge-Kutta............................................................................................................ 7-87
7.2.4 Mtodo de Euler Aprimorado (Mtodo de Runge-Kutta de Segunda Ordem) ................. 7-88
7.2.5 Frmulas de Runge-Kutta de Quarta Ordem......................................................................... 7-89
iv
ndices de Figuras
[FIG. 1]: M ODELAGEM E RESOLUO DE PROBLEMAS..............................................................................1-1
[FIG. 2]: O GRFICO DE UMA FUNO y = f ( x ) E SEUS ZEROS.........................................................2-11
[FIG. 3]: EXEMPLO DE UMA FUNO ESTRITAMENTE CRESCENTE NUM INTERVALO DE a AT b ..2-12
[FIG. 4]: O GRFICO DE f ( x ) = x 3 9 x + 3 .......................................................................................2-12
[FIG. 5]: O S GRFICOS DE g ( x ) = x 3 E h( x ) = 9 x 3 . ....................................................................2-13
[FIG. 6]: O GRFICO DE f ' ( x ) = 3 x 2 9 . ...........................................................................................2-13
[FIG. 7]: GRFICO DA FUNO f ( x ) = x ln x 3,2 ..........................................................................2-14
[FIG. 8]: GRFICO DA FUNO f ' ( x ) = 1 + ln x .................................................................................2-14
[FIG. 9]: O S GRFICOS DE g ( x ) = 5 log x E h( x ) = 2 0,4 x . ......................................................2-15
x
[FIG. 10]: O S GRFICOS DE g ( x ) = x E h( x ) = 5e . ................................................................2-15
[FIG. 11]: O MTODO DA BISSECO OU DICOTOMIA ................................................................................2-16
[FIG. 12]: O TANQUE DE COMPRIMENTO L . ..............................................................................................2-17
[FIG. 13]: UM EXEMPLO DE UMA FUNO DE PONTO FIXO.......................................................................2-19
[FIG. 14]: O S GRFICOS DAS FUNES y =x E 2 ( x ) = 6 x ......................................................2-20
[FIG. 15]: O S GRFICOS DAS FUNES y =x E 1 ( x ) = 6 x 2 . ........................................................2-21
[FIG. 16]: A SEQNCIA {x k } CONVERGE PARA O ZERO (CONVERGNCIA DO TIPO ESCADA).......2-22
[FIG. 17]: A SEQNCIA {x k } CONVERGE PARA O ZERO (CONVERGNCIA DO TIPO CARACOL)....2-22
[FIG. 18]: A SEQNCIA {x k } NO CONVERGE PARA O ZERO .............................................................2-22
[FIG. 19]: A SEQNCIA {x k } NO CONVERGE PARA O ZERO .............................................................2-23
[FIG. 20]: CASOS EM QUE B O EXTREMO MAIS PRXIMO DE ..............................................................2-24
[FIG. 21]: O S GRFICOS DE h (x ) = e x E g ( x ) = x 2 4 . ...................................................................2-26
[FIG. 22]: INTERPRETAO GEOMTRICA DO MTODO DE NEWTON.....................................................2-28
[FIG. 23]: O S GRFICOS DAS FUNES g (x ) = X E h (x) = cos x . .......................................................2-30
[FIG. 24]: INTERPOLAO DE f ( x ) PELO POLINMIO P ( x ). .............................................................4-47
[FIG. 25]: INTERPOLAO POR LAGRANGE .................................................................................................4-50
[FIG. 26]: GRFICO DO POLINMIO P10 ( x ) INTERPOLANDO f ( x ) .....................................................4-56
[FIG. 27]: SPLINE LINEAR INTERPOLANDO 4 PONTOS. ...............................................................................4-57
[FIG. 28]: DOMNIO DISCRETO......................................................................................................................5-64
[FIG. 29]: DOMNIO CONTNUO.....................................................................................................................5-64
[FIG. 30]: O MTODO DO MNIMOS QUADRADOS........................................................................................5-65
[FIG. 31]: DIAGRAMA DE DISPERSO...........................................................................................................5-68
[FIG. 32]: REGRA DOS TRAPZIO ..................................................................................................................6-74
[FIG. 33]: REGRA DOS TRAPZIOS REPETIDA ..............................................................................................6-76
[FIG. 34]: REGRA 1/3 DE SIMPSON...............................................................................................................6-78
[FIG. 35]: REGRA 1/3 DE SIMPSON REPETIDA .............................................................................................6-80
[FIG. 36]: GRFICO DA SOLUO NUMRICA DE UM PVI.........................................................................7-84
[FIG. 37]: GRFICO DO MTODO DE EULER................................................................................................7-85
Clculo Numrico Noes bsicas sobre erros 1-1
1.1 Erros
Para se obter a soluo do problema atravs do modelo matemtico, erros so
cometidos nas fases: MODELAGEM e RESOLUO.
Exerccio 1 Calcular a rea da superfcie terrestre usando a formulao A =4 r 2 .
Resoluo:Aproximaes (ERROS):
MODELAGEM:
RESOLUO:
(Eq.2) EAx k1 .
xi
Exerccio 5 Sabendo-se que e pode ser escrito como e = , faa a aproximao de
x x
i =0 i!
e 2 atravs de um truncamento aps quatro termos da somatria.
Resoluo:
Onde:
ai 0 ai <;
a.2) N
N
r1 q1
r2 q2
O
O O
qn 1
rn qn At que q n <
N10 =( q n rn rn 1 r3 r2 r1 )
Exerccio 11 Converta 5910 para a base 2.
Resoluo:
b) PARTE FRACIONRIA ( F ):
Multiplica-se F por e toma-se a parte inteira do produto como o primeiro dgito do
nmero na base . Repete-se o processo com a parte fracionria do produto tomando sua parte
inteira. Continua-se at que a parte fracionria seja igual a zero.
Nos exerccios a seguir, determinar o valor de x :
Exerccio 13 0,187510 = x2 .
Resoluo:
Exerccio 14 0,610 = x2 .
Resoluo:
Exerccio 15 13,2510 = x2 .
Resoluo:
Exerccio 17 19,3867187510 = x4 .
Resoluo:
1.6.2 Exerccios
Exerccio 20 Preencher a tabela a seguir, com base nos parmetros: t =3, =10, I =5, S =5
e 5 exp 5.
Nmero Truncamento Arredondamento
6,48
0,0002175
3498,3
0,00000001452
2379441,5
OBS. 4: Deve-se converter os valores para a aritmtica de ponto flutuante com 3
algarismos significativos.
Nos exerccios seguintes, calcular o valor das expresses utilizando aritmtica de
ponto flutuante com 3 algarismos significativos.
Exerccio 21 (4,26 + 9,24) + 5,04
Resoluo:
2
Exerccio 25 (4,0237 6,106)
7
Resoluo:
Resoluo:
.
Exerccio 31 101,00112 = x10 .
Resoluo:
Exerccio 35 234510 = x2 .
Resoluo:
a x
b
a x
b
y = f (x)
1 2 3 x
-4 -3 -2 -1 1 2 3 4
1 x
-4 -3 -2 -1 2 1 2 3 3 4
y = f ( x)
- 3 3 x
-4 -3 -2 -1 1 2 3 4
y y = f(x)
0,3
0,2
0,1 3,2 x
2,6 2,8 3,0 3,4
0
-0,1
-0,2
-0,3
-0,4
-0,5
-0,6
-0,7
-0,8
-0,9
-1,0
y f (x )
1 x
y g (x)
2
1
h(x)
1 2 3 x
y
2
g (x)
h(x)
1 2 3 x
m3
a m2 m1 b x
n a x b f (a ) f (x) f (b ) ( b a )/2
1
2
3
4
5
6
7
Portanto 5
Exerccio 43 Um tanque de comprimento L tem uma seco transversal no formato de um
semicrculo com raio r (veja a figura). Quando cheio de gua at uma distncia h do topo, o
h
volume V da gua : V= L 0,5 r 2 r 2arcsen h ( r 2 h 2 ) . Supondo que L =10 ft ,
r
3
r=1 ft e V=12,4 ft , encontre a profundidade da gua no tanque com preciso de 0,01 ft .
r
h h
n a h b f (a ) f (h ) f (b) (ba)/2
1
2
3
4
5
6
7
Assim, h =
(Eq.6) x n+1 = ( x n ) , n = 0, 1, 2,
y y= x
2 (x)
x0 x2 x3 x1 6 x
=2
[Fig. 14]: Os grficos das funes y = x e 2 ( x) = 6 x .
y
6 y= x
x2
x0 x1 x
=2
1 (x )
x3 x2 x1 x0 x
x1 x3 x 4 x 2 x0 x
x0 x1 x2 x3 x
x3 x1 x0 x2 x
OBS. 10: A determinao do extremo de I = [a, b] mais prximo do zero pode ser feito
da seguinte maneira: Suponhamos satisfeitas as hipteses i) e ii) do Teorema 2. Nestas
(a + b )
condies, seja x = (ponto mdio do intervalo I ). Sabe-se que ( x ) est mais
2
prximo de do que x . Se x < ( x ) , ento est entre x e b , ou seja, b o extremo de I
mais prximo de . Analogamente, se x > ( x ) , ento a o extremo de I mais prximo de
. Se x = ( x ) , ento x o zero procurado.
a x b
(x) x
a x b
(x) x
[Fig. 20]: Casos em que b o extremo mais prximo de .
Logo,
Resoluo:
Verificao da condio i):
Logo,
pn p n1
<
pn
f ( pn ) <
y h(x ) = e x
5 g (x) = x 2 - 4
4
3
2
1
-3 -2 -1 1 2 3 x
-1
-2
-3
-4
[Fig. 21]: Os grficos de h (x ) = e x e g ( x ) = x 2 4 .
n xn x n+1 xn+1 x n
0
1
2
3
Portanto, x =
xn +1 xn
f (x) x2 x1 x0 x
f (x n ) f ( xn )
tg = f ' ( xn ) = x n+1 = x n
x n x n+1 f ' (x n )
OBS. 14: Para se escolher o ponto inicial x 0 , pode-se, por exemplo, fazer x 0 = a se
(a ) [a , b] ou x0 = b caso contrrio.
p n p n1
<
pn
f ( pn ) <
y g (x) = x
1
3 h(x )= cos x
2
2 x
2
-1
[Fig. 23]: Os grficos das funes g (x ) = x e h (x) = cos x .
n xn xn +1 xn+1 xn
0
1
2
Portanto, x =
Resoluo:
n a x b f (a ) f ( x ) f (b ) ( b a )/2
1
2
3
4
5
6
7
8
9
Universidade Tecnolgica Federal do Paran (UTFPR) LAURO / NUNES
Clculo Numrico Zeros reais de funes reais 2-31
10
11
12
13
14
Logo, x =
2 x1 + 3x2 x3 = 5
Exerccio 54 Resolver o sistema S3 , com S3 = 4 x1 + 4 x2 3 x3 = 3 .
2 x 3x + x3 = 1
1 2
Resoluo:
(2) B1
(1)
(3) m32 =
(1)
(4) m42 =
(3) B2
(2 )
(4) m43 =
(4) B3
Ento A x = b U x = c [ A : b ] [ U : c ].
U x=c
Logo: x =
r=
TRIANGULARIZAO: A x = b U x = c .
Para k =1, 2, , ( n 1)
Para i =( k +1), , n
aik
m=
akk
aik =0
Para j =( k +1), , n
bi = bi m bk
FIM
FIM
FIM
RESOLUO DO SISTEMA U x = c .
bn
xn =
ann
Para k =( n 1), , 2, 1
s =0
Para j =( k +1), , n
s = s + akj x j
FIM
bk s
xk =
akk
FIM
Dado A x = b , tome B =[ A : b ].
a11 a12 L a1q L a1n b1
a21 a22 L a2 q L a2 n b2
M M M M M
B= .
a p1 a p 2 L a pq L a pn bp
M M M M M
an1 an2 L anq L ann bn
U x=c
REFINAMENTO:
x ( k ) = x (k 1) + ( k 1) A ( k 1) = r (k 1) [ A : r (k 1) ] ( k 1)
Resoluo:
k =1 [ A : r (0 ) ] ( 0) x (1) = x (0) + ( 0)
Linha Multiplicador m Matriz Aumentada
(1) B0 8,7000 3,0000 9,3000 11,0000 -0,0240
(0 )
(2) m21 = 24,5000 -8,8000 11,5000 -45,1000 -0,0420
(3) (0 ) =
m31 52,3000 -84,0000 -23,5000 11,4000 0,0820
(4) (0 ) =
m41 21,0000 -81,0000 -13,2000 21,5000 0,4680
(2) B1
(3) m(1
32
) =
(4) m(1
42
)
=
(3) B2
(2 )
(4) m43 =
(4) B3
Considerando 4 casas decimais:
[ A : r (0 ) ]
Ento:
[ A : r (0 ) ] ( 0)
Como:
x (1) = x (0) + ( 0)
r (1 ) = b A x (1)
Logo,
Resoluo:
F= e d=
x ( k +1) = F x ( k ) + d
x=
Neste caso, a matriz dos coeficientes das incgnitas A dita estritamente diagonal
dominante.
Exerccio 60 Verificar se o critrio das linhas satisfeito no sistema de equaes A x = b ,
10 x1 + 2 x2 + x3 = 7
que segue: A x = b x1 + 5 x2 + x3 = 8
2x + 3x 2 + 10 x3 = 6
1
10 2 1
Resoluo:
A= 1 5 1
2 3 10
Logo, a matriz dos coeficientes A estritamente diagonal dominante, o que garante a
convergncia do mtodo de Gauss-Jacobi aplicado a este sistema com esta ordem de
equaes e incgnitas.
Exerccio 61 Verificar se o critrio das linhas satisfeito no sistema de equaes A x = b ,
x1 + 3x 2 + x3 = 2
que segue: A x = b 5 x1 + 2 x2 + 2 x3 = 3
+ 8 x3 = 6
6 x2
1 3 1
Resoluo:
A = 5 2 2
0 6 8
Logo a matriz dos coeficientes A no estritamente diagonal dominante. Isto significa
que no garantida a convergncia do mtodo de Gauss-Jacobi aplicado a este sistema
com esta ordem de equaes e incgnitas.
Mas permutando adequadamente as equaes do sistema, obtm-se o sistema equivalente:
A=
Logo, esta nova matriz dos coeficientes A estritamente diagonal dominante, o que
garante a convergncia do mtodo de Gauss-Jacobi aplicado a este sistema com esta nova
ordem de equaes e incgnitas.
x=
F= e d=
x=
Exerccio 64 Resolva o sistema A x = b , utilizando o mtodo de Gauss-Seidel, com
x (0 )
= 0n1 e =0,05.
5 x1 + x2 + x3 = 5
A x = b 3 x1 + 4 x2 + x3 = 6
3 x + 3x + = 0
1 2 6 x3
Resoluo:
Neste caso a frmula de recorrncia fica:
( k +1)
x1 =
( k +1)
x2 =
( k +1)
x3 =
k x1( k ) x (2k ) x3( k ) max xi(k ) xi(k 1)
1i 3
0 0 0 0 -
1
2
3
Com x ( 0) = [0 0 0]T e =0,05, o processo convergiu com ......... iteraes para:
x=
n
1
1 = a1 j
a11 j= 2
1 i 1 n
i = aij j + aij , i = 2, 3, , n .
j =1
aii j =i +1
OBS. 19: Se o critrio das linhas satisfeito, ento o critrio de Sassenfeld tambm ser
satisfeito.
Exerccio 65 Verificar se o critrio de Sassenfeld satisfeito no sistema de equaes
x1 + 0,5 x2 0,1x3 + 0,1x4 = 0, 2
0, 2 x + 0,2 x 3 0,1x4 = 2,6
x2
A x = b , que segue: A x = b 1
1
1 = [ a12 + a13 ] =
a11
1
2 = [ a 21 1 + a 23 ] =
a 22
1
3 = [ a31 1 + a32 2 ] =
a33
Ento, M = max i =
1i 3
4 Interpolao
4.1 Interpolao polinomial
Uma funo f ( x ) pode ser conhecida por um conjunto finito e discreto de n +1
pontos.
y ( x4 , y4 ) f (x)
( x0 , y0 )
( x1 , y1 )
( x3 , y3 ) ( x5 , y5 )
( x2 , y2 )
P(x )
x0 x1 x2 x3 x4 x5 x
[Fig. 24]: Interpolao de f ( x ) pelo polinmio P ( x ).
xi yi
x0 y0
x1 y1
x2 y2
x3 y3
x4 y4
x5 y5
a0 + a1x0 + a2 x0
2
+ L + an x0
n
= f ( x0 ) (i = 0 )
M M M M M
a + + a2 xn2 + L + an xnn = (i = n )
0 a1xn f ( xn )
1 x0 x0 L x0
2 n
x12 L x1n
A=
1 x1
.
M M M M
1 xn xn2 L xnn
( x x1 )( x x2 )
i =0 L0 ( x )=
( x0 x1 )( x0 x2 )
k =0 L0 ( x0 )= .......... .
k =1 L0 ( x1 )= .......... .
k =2 L0 ( x2 )= .......... .
( x x0 )( x x2 )
i =1 L1 ( x )=
( x1 x0 )( x1 x2 )
k =0 L1 ( x0 )= .......... .
k =1 L1 ( x1 )= .......... .
k =2 L1 ( x2 )= .......... .
( x x0 )( x x1)
i =2 L2 ( x )=
( x2 x0 )( x2 x1 )
k =0 L2 ( x0 )= .......... .
k =1 L2 ( x1 )= .......... .
k =2 L2 ( x2 )= .......... .
Para x = xk , com k =0,1,2,, n , temos:
Logo:
P3 ( x )=
P3 ( x )=
P3 (1,5)= P3 ( 32 )=
P3 (1,5)=
P3 (1,5)=
P3 (x )
2
3
8
-1 0 1 3
2 x
2
[Fig. 25]: Interpolao por Lagrange.
f [ x1 , x2 , x3 ] f [ x0 , x1, x2 ]
f [ x0 , x1 , x2 , x3 ]= 3
x3 x0
M M
f [ x1, x2 ,L , xn ] f [ x0 , x1,L, xn1]
f [ x0 , x1 ,, xn ]= n
xn x0
f [ x0 , x1 ]
x1 f [ x1 ] f [ x0 , x1 , x2 ]
f [ x1 , x2 ] f [ x0 , x1 , x2 , x3 ]
x2 f [ x2 ] f [ x1 , x2 , x3 ] O
f [ x2 , x3 ] f [ x1 , x2 , x3 , x4 ]
x3 f [ x3 ] f [ x2 , x3 , x4 ] O
f [ x3 , x4 ] M f [ x0 ,, xn ]
x4 f [ x4 ] M N
M f [ xn 3 , xn 2 , xn1 , xn ]
M M f [ xn 2 , xn1 , xn ]
f [ xn1 , xn ]
xn f [ xn ]
P3 ( x )= f [ x0 ]+( x x0 ) f [ x0 , x1 ]+( x x0 )( x x1 ) f [ x0 , x1 , x2 ]+
+( x x0 )( x x1 )( x x 2 ) f [ x0 , x1 , x2 , x3 ]
P3 ( x )=
P3 ( x )=
P3 ( x )=
f ( n+1) ( x )
(Eq.20) En ( x )=( x x0 )( x x1 )( x x n )
( n + 1)!
onde x ( x 0 , x n ).
Esta frmula tem uso limitado, pois so raras as situaes em que f ( n+1) ( x )
conhecida e o ponto x nunca conhecido.
| En ( x )|=| f ( x ) Pn ( x )|
n
M n+1
| En ( x )| ( x xi ) , onde M n+1 = max f (n+1) ( x ) .
i =0 ( n + 1)! xI
| En ( x )| ( x xi ) max ( Dd )
n
(Eq.21)
i =0
0,34
0,4
0,52
0,6
0,72
Deve-se escolher 3 pontos prximos de 0,47 para a obteno de P2 ( x ).
P2 ( x )= f [ x0 ]+( x x0 ) f [ x0 , x1 ]+( x x0 )( x x1 ) f [ x0 , x1 , x2 ]
P2 ( x )=
P2 ( x )=
a) P2 (0,47)= .......... .......... f (0,47)
b) | En (0,47)|
| En (0,47)| ..........
Exerccio 71 Prove a igualdade seguinte.
x x1 x x0
P1 ( x )= f ( x 0 ) + f ( x1 ) = f [ x0 ]+( x x0 ) f [ x0 , x1 ]
x0 x1 x1 x0
Resoluo:
x ordem 0 ordem 1
x0 f [ x0 ]= ..........
f [ x0 , x1 ]=
..........
x1 f [ x1 ]= .......... P1 ( x )= f [ x0 ]+( x x0 ) f [ x0 , x1 ]
P1 ( x )=
P1 ( x )=
P1 ( x )=
P1 ( x )=
P1 ( x )=
P1 ( x )=
P1 ( x )=
x x1 x x0
P1 ( x )= f ( x 0 ) + f ( x1 )
x0 x1 x1 x0
P1 ( x )=
P1 ( x )=
P1 ( x )=
P1 ( x )=2
Obter x , tal que e x =1,3165, usando um processo de interpolao quadrtica. Usar a forma de
Newton para obter P2 ( y ). Construir a tabela de diferenas divididas.
Resoluo:
y ordem 0 ordem 1 ordem 2 ordem 3
1
1,1052
1,2214
1,3499
1,4918
1,6487
P2 ( y )= g [ y0 ]+( y y0 ) g [ y0 , y1 ]+( y y0 )( y y1 ) g [ y0 , y1 , y2 ]
P2 ( y )=
P2 (1,3165)=
M3
1o Caso: pode ser aproximado por .......... (tabela de diferenas divididas de ordem 3).
3!
| E2 (1,3165)| .......... .......... .......... .......... | E2 ( y )| .......... .......... .......... .
2o Caso: f ( x )= e x g ( y )= f 1 ( y )= ln y
Logo: M 3 =
| E2 (1,3165)|
3
y
2
1
2
P10(x )
f (x )
-1 - 12 0 1 1 x
2
3) S p ( xi )= f ( xi ), com i =0,1,, n .
xi x x xi 1
(Eq.22) si ( x )= f ( xi 1 ) + f ( xi ) , x [ xi 1 , xi ].
xi xi 1 xi xi 1
x0 x1 x2 x3
x 1 2 5 7
y = f (x) 1 2 3 2,5
y s3 (x)
3 f (x )
2,5
s2 (x)
2
s1(x)
1
0 1 2 3 4 5 6 7 x
[Fig. 27]: Spline linear interpolando 4 pontos.
x2 x x x1
s2 ( x )= y1 + y2
x2 x1 x2 x1
x3 x x x2
s3 ( x )= y2 + y3
x3 x2 x3 x2
S1 ( x )=
A spline linear tem derivada primeira descontnua nos ns. A spline quadrtica S2 ( x )
tem derivadas contnuas at ordem 1, portanto, pode ter picos ou troca abrupta de curvatura
nos ns.
A spline cbica S3 ( x ) mais utilizada por ter derivadas primeira e segunda contnuas,
que faz S3 ( x ) ser mais suave nos ns.
1) S3 ( x )= sk ( x ) para x [ xk 1 , xk ], k =1,2,, n .
2) S3 ( xi )= f ( xi ), com i =0,1,, n .
3) sk ( xk )= sk +1 ( xk ), k =1,2,,( n 1).
(Eq.26) a k +1 h 3k +1 + bk +1 h 2k +1 ck +1 h k +1 + d k +1 = f ( xk ).
Para as condies 4) e 5) , tome as derivadas:
(Eq.27) sk, ( x )=3 a k ( x xk )2 +2 b k ( x xk )+ c k .
sk,, ( xk )
(Eq.29) bk = .
2
Para x = xk 1 sk,, ( xk 1 )=6 a k h k +2 b k .
2bk sk,, ( xk 1 ) sk,, ( xk ) s ,k, ( xk 1 )
ak = = .
6h k 6 hk
sk,, ( xk ) s ,k,1( xk 1 )
(Eq.30) ak = , com s0,, ( x0 ) arbitrria.
6h k
f ( xk ) f ( xk 1 ) 2s k ( xk ) h k + sk 1( xk 1) h k
,, ,,
(Eq.31) ck = + .
hk 6
gk g k 1
(Eq.32) ak =
6h k
gk
(Eq.33) bk =
2
y k yk 1 2hk gk + g k 1hk
(Eq.34) ck = +
hk 6
(Eq.35) d k = yk .
y yk yk yk 1
(Eq.36) h k g k 1 +2( h k + h k +1 ) g k + h k +1 gk +1 =6 k +1 , com k =1,2,,( n 1).
hk +1 h
k
A equao (Eq.36) um sistema de equaes lineares A g = b , onde k =1,2,,( n 1).
Desenvolvendo o sistema A g = b :
.......... g 0 + .......... g1 + ..........g 2 =
..........
.......... g1 + .......... g 2 + .......... g3 =
..........
.......... g 2 + ..........g 3 + ..........g 4 =
..........
g 0 = g 4 = .......... (Spline Natural).
Ento,
.......... .......... .......... g1 ..........
A g = b .......... .......... .......... g 2 = .......... ..........
.
.......... .......... .......... g 3 ..........
Substituindo os valores:
.......... .......... .......... g1 .......... ..........
g = g = .
.......... .......... .......... 2 .......... ..........
.......... .......... .......... g 3 .......... ..........
Forma geral de s i ( x ) s i ( x )= ai ( x xi )3 + bi ( x xi )2 + ci ( x xi )+ d i , com i =1,2,3,4.
f (0,25) s1 (0,25)
g1 g0
a1 = = .......... a1 = ..........
6h
g
b1 = 1 = .......... b1 = ..........
2
y y0 2hg1 + g0h
c1 = 1 + = .......... c1 = ..........
h 6
d 1 = y1 = .......... d 1 = ..........
Logo, s1 (0,25)= ..........
Exerccio 76 f (0,8).
Resoluo:
f (0,8) s 2 (0,8)
g2 g1
a2= = .......... a 2 = ..........
6h
g
b 2 = 2 = .......... b 2 = ..........
2
y y1 2hg 2 + g1h
c2= 2 + = .......... c 2 = ..........
h 6
d 2 = y2 = .......... d 2 = ..........
Exerccio 77 f (1,1).
Resoluo:
f (1,1) s 3 (1,1)
g3 g 2
a3 = = .......... a 3 = ..........
6h
g
b3 = 3 = .......... b3 = ..........
2
y y2 2hg 3 + g 2h
c3 = 3 + = .......... c 3 = ..........
h 6
d 3 = y3 = .......... d 3 = ..........
Logo, s 3 (1,1)=0,7137(0,4) 3,1260(0,4)2 8,6678(0,4)4,1987
3
Exerccio 79 f (1,3).
Resoluo:
f (1,3) s 3 (1,3)
g3 g 2
a3 = = .......... a 3 = ..........
6h
g
b3 = 3 = .......... b3 = ..........
2
y3 y2 2hg 3 + g 2h
c3 = + = .......... c 3 = ..........
h 6
d 3 = y3 = .......... d 3 = ..........
Logo, s 3 (1,3)= ..........
Exerccio 80 f (1,7).
Resoluo:
f (1,7) s 4 (1,7)
g4 g3
a4= = .......... a 4 = ..........
6h
g
b 4 = 4 = .......... b 4 = ..........
2
y y3 2hg4 + g3h
c4= 4 + = .......... c 4 = ..........
h 6
d 4 = y4 = .......... d 4 = ..........
Logo, s 4 (1,7)= ..........
a x
b
f ( x k)
dk
g( xk) x
xk
[Fig. 30]: O mtodo do mnimos quadrados
F
( 1 , 2 , 3 ,L , n ) =
j
m
2 [ f ( x k ) 1 g1 ( xk ) 2 g 2 ( xk ) L n g n ( x k )] [ g j ( x k )] =0, j =1, 2, 3, , n
k =1
ou
m
[ f (x k ) 1g1 ( xk ) 2 g 2 ( xk ) L n g n ( xk )] [g j ( xk )] =0,
k =1
j =1, 2, 3, , n
Assim, tem-se o seguinte sistema de n equaes lineares com n incgnitas 1 , 2 ,
3 , , n :
m
[ f ( x k ) 1g1 ( x k ) 2 g 2 ( xk ) L n g n ( xk )] [ g1( xk )] = 0
k =1
m
[ f ( x k ) 1g1 ( x k ) 2 g 2 ( xk ) L n g n ( xk )] [ g 2 ( x k )] = 0
(Eq.37) k =1
M M
m
[ f ( x k ) 1g1 ( x k ) 2 g 2 ( xk ) L n g n ( xk )] [ g n ( x k )] = 0
k =1
Que equivalente a:
m m m
1 k g ( x ) g1 k
( x ) 1 + L + 1 k g ( x ) g n k
( x ) n = g1( xk ) f ( xk )
k =1 k =1 k =1
m m m
2 k g ( x ) g 1 k
( x ) 1 + L + 2 k g ( x ) g n k
( x ) n = g 2 ( xk ) f ( x k )
(Eq.38) k =1 k =1 k =1
M M
m m m
g n ( xk ) g1 ( x k ) 1 + L + g n ( xk ) g n ( xk ) n = g n ( x k ) f ( xk )
k =1 k =1 k =1
m
Lembrando que, dados os vetores x e y m o nmero real x, y = xk y k
k =1
chamado de produto escalar de x por y , e usando esta notao no sistema normal A = b ,
tem-se: a ij = gi , g j e bi = g i , f onde:
g l o vetor [ g l ( x1 ) g l ( x2 ) g l ( x3 ) L g l ( x m )]T e
f o vetor [ f ( x1 ) f ( x 2 ) f ( x 3 ) L f ( x m )]T .
Desta forma o sistema na forma matricial fica:
g1 , g1 g1 , g 2 L g1 , g n 1 g1 , f
g , g g , g L g , g
2 1 n 2 g 2 , f
(Eq.39)
2 2 2
=
M M M M M
g n , g1 g n , g 2 L g n , g n n g n , f
Demonstra-se que, se as funes g 1 ( x ), g 2 ( x ), g 3 ( x ), , g n ( x ) forem tais que os
vetores g1 , g 2 , g 3 ,L , g n , sejam linearmente independentes (LI), ento det A 0 e o sistema
de equaes possvel e determinado (SPD). Demonstra-se ainda que a soluo nica deste
sistema, 1 , 2 , 3 , , n o ponto em que a funo F ( 1 , 2 , 3 ,, n ) atinge seu
valor mnimo.
OBS. 22: Se os vetores g1 , g 2 , g 3 ,L , g n , forem ortogonais entre si, isto , se
g i , g j = 0 se i j e g i , g j 0 se i = j , a matriz dos coeficientes A ser uma matriz
diagonal, o que facilita a resoluo do sistema A = b .
Exerccio 81 (Regresso Linear) Ajustar os dados da tabela abaixo atravs de uma reta.
i 1 2 3 4 5
xi 1,3 3,4 5,1 6,8 8,0
f ( xi ) 2,05 1,153 0,45 0,4 0,5 0 0,2 0,6 0,512 1,2 2,05
y
2
-1 1 x
g1 , g1 = ..............................................................................................................................................................................
..............................................................................................................................................................................
g1 , f = ..............................................................................................................................................................................
..............................................................................................................................................................................
Assim, 1 = .................... .
f ( xi ) 1 3 1 9
g ( x ) = .................................................
b b b
F ()= f ( x) 2dx 2 f ( x ) g ( x)dx + g ( x) 2dx .
a a a
F
Ao desenvolver ()=0, j =1,2,, n , obtm-se:
j
bg 2 ( x) dx + L + g1( x ) g n ( x )dx n
b b
a 1 1 a
= a f (x )g1( x)dx
b
g2 ( x ) g1 ( x )dx 1 + L + g 2 ( x ) g n ( x )dx n
b b
a a
= a f (x )g 2 ( x)dx .
M O M M
b
a gn ( x ) g1( x ) dx 1 + L + b g 2( x )dx b
a n n = a f (x )g n ( x )dx
Este um sistema linear A = b de ordem n .
b
A =( aij ) tal que aij = gi ( x) g j ( x )dx = a ji aij = a ji .
a
(Eq.40) A =( aij )= gi , g j e b =( bi )= f , gi .
a22 = g 2 , g 2 = ..........
b1 = f , g1 = ..........
b2 = f , g 2 = ..........
A = b
Logo:
a11 a12 1 b1 g , g g1 , g 2 1 f , g1
A = b = 1 1 =
a21 a22 2 b2 g2 , g1 g 2 , g 2 2 f , g2
a22 = g 2 , g 2 = ..........
b1 = f , g1 = ..........
b2 = f , g 2 = ..........
g ( x )= ................................................. f ( x )= e x em [0,1].
ln f ( x ) ln 1 e 2 x = ln 1 + 2 x = G ( x ).
Fazendo ln 1 = a1 e 2 = a2 , tem-se: G ( x )= a1 + a 2 x ,
Desta forma G ( x ) ln f ( x ), sendo que G ( x ) linear nos parmetros a1 e a 2 .
1
2o ) f ( x ) =g (x)
1 + 2 x
1
1 + 2 x = G ( x ).
f ( x)
Fazendo 1 = a1 e 2 = a2 , tem-se: G ( x )= a1 + a 2 x ,
1
Desta forma G ( x ) , sendo que G ( x ) linear nos parmetros a1 e a 2 .
f ( x)
3o ) f ( x ) 1 + 2 x = g ( x )
f 2 ( x ) 1 + 2 x = G ( x ).
Fazendo 1 = a1 e 2 = a2 , tem-se: G ( x )= a1 + a 2 x ,
g1, g1 g1, g 2 a1 , g1
g , g g , g a = , g 2
2 1 2 2 2
g1 =[ .......... .......... .......... ]T
g 2 =[ .......... .......... .......... ]T
.................... =[ .................... .................... .................... ]
T
g1 , g1 = ..............................................................................................................................................................................
g1 , g 2 = ..............................................................................................................................................................................
g 2 , g1 = g1 , g 2 = ..........
g 2 , g 2 = ..............................................................................................................................................................................
.............. , g1 = ..............................................................................................................................................................................
............. , g 2 = ..............................................................................................................................................................................
g ( x )= ................................................. f ( x ).
6 Integrao Numrica
Se uma funo f ( x ) contnua em um intervalo [a , b ] e sua primitiva F ( x )
conhecida, ento
b
(Eq.41) a f (x )dx = F ( b ) F ( a )
onde F ' ( x )= f ( x ).
Por outro lado, nem sempre se tem F ( x ) e em alguns casos, a funo a ser integrada
dada por meio de tabela de pontos. Neste caso, torna-se necessria a utilizao de mtodos
numricos.
A idia bsica da integrao numrica a substituio da funo f ( x ) por um
polinmio que a aproxime no intervalo [ a , b ]. Assim o problema fica resolvido pela
integrao de polinmios, o que trivial de se fazer.
f ( x0)
0 a= x 0 b = x1 x
h= b - a , h= x1- x 0
[Fig. 32]: Regra dos trapzio.
x x1 x x0
(Eq.43) p 1 ( x )= f ( x 0 )+ f ( x1 )
h h
b f " ( x )
ET = ( x a )( x b ) dx
a 2
1 " b
ET = f ( c ) ( x a )( x b ) dx
2 a
1 ( b a )3
ET = f " ( c )
2 6
h3 "
(Eq.44) ET = f ( c ) com c ( a , b )
12
ou
h3
(Eq.45) | ET | max | f " ( x )|
12 x[ a,b]
OBS. 23:
b
b x 3 ax 2 bx 2 b 3 3ab 2 + 3a 2 b a 3 ( b a )3
a ( x a x b x + a b ) dx = = =
2
.
3 2 2 6 6
a
9
Exerccio 87 Calcular 1 6x 5 dx , usando a regra dos trapzios.
Resoluo:
9
1 6x 5 dx I T = .................... .
Logo, | ET | .................... .
f (x )
0 a = x0 x1 x2 x3 x n-1 b = xn x
[Fig. 33]: Regra dos trapzios repetida
h = x1 x 0 = x 2 x1 = x 3 x 2 = = x n x n 1
ba
h= , com n sendo o nmero de subdivises do intervalo [ a , b ].
n
b
a f (x )dx A1 + A2 + A3 ++ An tal que Ai =rea do trapzio i , com i =1,2,, n .
h
Ai = [ f ( x i 1 )+ f ( x i )]
2
n 1
h
[ f ( x 0 )+ f ( x n )+2 f ( x i ) ]
b
(Eq.46) a f ( x ) dx
2 i =1
9
Exerccio 88 Calcular 1 6x 5 dx empregando o mtodo dos trapzios com 8 repeties.
Determine uma aproximao para o erro cometido.
Resoluo:
f (x)
9
1 6x 5 dx .................... .
| ETR | .................... .
Neste caso em particular, f ( x ) pode ser integrada de forma exata:
9
1 6x 5 dx = .................... .
1
Exerccio 89 Seja I = e x dx . Calcule uma aproximao para I usando 10 subintervalos e a
0
regra dos trapzios repetida. Estimar o erro cometido.
Resoluo:
1 x
0 e dx .................... .
Erro cometido ser, no mximo:
| ETR | .................... .
1
Exerccio 90 Seja I = e x dx . Qual o nmero mnimo de subdivises, para a regra dos
0
trapzios repetida aplicada em I , de modo que o erro seja inferior a 103 ?
Resoluo:
n = .................... .
y
f (x)
f ( x0) p2 (x )
f ( x2)
f ( x1)
0 a= x 0 m= x 1 b = x2 x
h h
[Fig. 34]: Regra 1/3 de Simpson.
x0 = a , x1 = m e x2 = b
a+b
m = x1 =
2
ba
h=
2
x0 x1 = h , x0 x2 =2 h ,
x1 x0 = h , x1 x2 = h ,
x2 x0 =2 h , x2 x1 = h .
( x x1 )( x x 2 ) ( x x 0 )( x x 2 ) ( x x 0 )( x x1 )
p 2 ( x )= f ( x 0 )+ f ( x1 )+ f ( x2 )
( h)( 2h ) ( h )( h ) ( 2 h)( h )
b x2 x2
a f ( x ) dx = f ( x )dx p2 ( x) dx
x0 x0
f ( x0 ) x2 f ( x1) x2 f ( x2 ) x2
2 x x (x x0 )( x x1)dx
= ( x x1 )( x x2 ) dx 2
( x x0 )( x x2 )dx +
2h 0 h x 0 2h2 0
h
= [ f ( x 0 )+4 f ( x1 )+ f ( x2 )]. Logo:
3
b x2 h
(Eq.48) a f ( x ) dx = f ( x )dx
x0 3
[ f ( x 0 )+4 f ( x1 )+ f ( x2 )].
b b f ''' ( x )
(Eq.49) ES = R2 ( x) dx = ( x x0 )( x x1 )( x x2 ) dx
a a 3!
h5 4
ES = f () com ( a b ).
90
h5
(Eq.50) | ES | = max | f 4 ( x ) |
90 x[ a,b]
ba ( b a) 5
Considerando h = h5 = , tem-se:
2 32
( b a) 5
(Eq.51) | ES | max | f 4 ( x ) |.
2880 x[ a,b]
f (x)
0 a = x0 x1 x2 x3 x4 x5 x6 xm -2 xm -1 b = x m x
h
[Fig. 35]: Regra 1/3 de Simpson repetida
ba
Na figura, tome h = h = xi xi 1 ( i =1,2, m ), para m =2 n m par.
2n
Aplica-se a regra de Simpson repetidas vezes no intervalo [ a , b ]=[ x0 , xm ].
h5
(Eq.53) ESR n max | f 4 ( x ) |
90 x[ a,b]
ba ( b a) 5
Considerando h = h5 = , tem-se:
2n 32n 5
( b a) 5
(Eq.54) ESR max | f 4 ( x ) |
4 x[ a ,b ]
2880n
1 x
0 e dx ................................................. .
Estimativa do erro:
ESR ................................................. .
Observe que ESR ................................................. e ETR ..................................................
1
Exerccio 92 Seja I = e xdx . Para que valor de m teramos erro inferior a 103 ?
0
Resoluo:
h = ................................................. h = .................... .
i 0 1 2 3 4 5 6 7 8
xi
f ( xi )
10
6 log xdx ................................................. .
Estimativa do erro:
ETR ................................................. .
10
Exerccio 94 Seja I = log xdx . Aproxime I com a regra de Simpson com 8
6
subintervalos. Estime o erro cometido.
Resoluo:
10
6 log xdx ................................................. .
Estimativa do erro:
E SR ................................................. .
2u 2u
+ =0, com u u ( x , y ).
x 2 y 2
A ordem de uma equao diferencial a mais alta ordem de derivao que aparece na
equao.
Se, dada uma equao diferencial de ordem n , a funo, assim como suas derivadas
at ordem n 1, so especificadas em um mesmo ponto, ento temos um problema de valor
inicial (PVI).
Se, em problemas envolvendo equaes diferenciais ordinrias de ordem n , n 2, as
n condies fornecidas no so dadas todas num mesmo ponto, ento temos um problema de
valor de contorno (PVC).
dy
Exerccio 95 Resolver a seguinte EDO: = xy .
dx
Resoluo:
y = .................... .
y (xm )
Soluo
Exata ym
y (x3 )
y (x2) Soluo
y (x1 ) y3 Numrica
y (x0)
y (x0 ) = y0 y2
y0 y1
x0 x1 x2 x3 xm -1 xm
[Fig. 36]: Grfico da soluo numrica de um PVI.
y (x0 ) = y0
x0 x1
[Fig. 37]: Grfico do mtodo de Euler.
(Eq.57) y ( x )= y ( x0 )+( x x0 ) y , ( x0 ).
y, = x y + 2
Exerccio 97 Achar aproximaes para a soluo do PVI na malha de [0,1]
y( 0 ) = 2
com h =0,1.
Resoluo:
1 0
x0 =0, y0 =2, a =0, b =1, m = m =10.
0,1
Usar (Eq.59) para j =0,1,2,,9.
j =0:
j =1:
TABELA:
j xj yj y (xj) y j y ( x j )= e j
0 0 2 2
1 2,004837
2 2,018731
3 2,040818
4 2,07032
5 2,106531
6 2,148812
7 2,196585
8 2,249329
9 2,30657
10 2,367879
Na pratica, no se dispe da soluo exata y ( x j ) do PVI. Da a necessidade de se
determinar uma expresso matemtica para o erro. Usa-se a frmula de Taylor para
desenvolver y ( x ), soluo terica do PVI, em torno de x0 :
x x0 , ( x x0 ) 2 ,, ( x x0 ) 3 ,,,
(Eq.61) y ( x )= y ( x0 )+ y ( x0 )+ y ( x0 )+ y ( x0 )+
1! 2! 3!
Fazendo x = x1 e lembrando que y ( x0 )= y0 , x1 x0 = h , y , ( x0 )= f ( x0 , y ( x0 )) e
y1 = y ( x1 ), toma-se os dois primeiros termos da (Eq.61):
y1 = y0 + h f ( x0 , y0 ). Generalizando-se, tem-se (Eq.59).
h2 , ,
(Eq.62) ej = y (), x j 1 << x j ,
2!
que o ERRO LOCAL DE TRUNCAMENTO ELT.
h2 , ,
(Eq.64) y j +1 = y j + h y ( x j )+
,
y ( x j ), para j =0,1,2,, m 1.
2!
f f x f y
(xj, yj )= ( x j , yj ) (xj, y j) + ( x j , yj ) (xj, yj)
x4243 x
1 x4243 y
1 x4243
1
= y ,, ( x j ) =1 = f (x j ,y j )
f f
y ,, ( x j )= ( x j , y j )+ ( x j , y j ) f ( x j , y j )
x y
y, = x y + 2
Exerccio 98 Achar aproximaes para a soluo do PVI na malha [0,1] com
y( 0) = 2
h =0,1 usando o mtodo da (Eq.64).
Resoluo:
j =1:
TABELA:
j xj yj y (xj) y j y ( x j )= e j
0 0 2 2
1 2,004837
2 2,018731
3 2,040818
4 2,07032
5 2,106531
6 2,148812
7 2,196585
8 2,249329
9 2,30657
10 2,367879
dy
= xy
Exerccio 99 Achar aproximaes para a soluo do PVI dx na malha [0,1] com
y( 0) = 1
h =0,5 usando o mtodo de Euler Aprimorado.
Resoluo:
y ( x j )= e x | y j y ( x j )|
2
j xj yj k1 k2 /2
0 0 1
1
2
h h
k 2 = f ( x j + , y j + k1 ),
2 2
h h
k3 = f ( x j + , y j + k2 ) e
2 2
k 4 = f ( x j + h , y j + h k3 ).
dy
= xy
Exerccio 100 Calcular a soluo do PVI dx com h =0,1, no interior do intervalo
y( 0) = 1
[0,1], pelo mtodo de Runge-Kutta de quarta ordem.
Resoluo:
h
y j +1 = y j + ( k1 +2 k 2 +2 k3 + k 4 ), para j =0,1,2,,9.
6
k1 = .........................................................................................
k 2 = .........................................................................................
k3 = .........................................................................................
y, = x y + 2
Exerccio 101 Achar aproximao para a soluo do PVI na malha [0,1] com
y( 0 ) = 2
h =0,1 usando o mtodo de Runge-Kutta de segunda ordem (Euler aprimorado).
Resoluo:
1 0
x0 =0, y0 =2, a =0, b =1, m = m =10.
0,1
0,1
y j +1 = y j + ( k1 + k 2 ), para j =0,1,2,,9.
2
k1 = ......................................................................................... e k 2 = .........................................................................................
j xj yj k1 k2
0 0 2
1
2
3
4
5
6
7
8
9
10