Beruflich Dokumente
Kultur Dokumente
Campus Curitiba
Departamento Acadmico de Matemtica
Prof: Lauro Csar Galvo
Clculo Numrico
Curitiba PARAN
Clculo Numrico
2
Exerccio 1
Supondo que a velocidade do som na gua varia com a temperatura de acordo
com a tabela abaixo, determinar, utilizando um polinmio interpolador de Lagrange, um valor
aproximado para a velocidade do som na gua em uma temperatura de 100 0 C .
Temperatura ( 0 C)
86,0
93,3
98,9
104,4
110,0
Velocidade ( m / s )
1552
1548
1544
1538
1532
O
polinmio
de
Lagrange
procurado
ser
P4 (x) = L0 f ( x0 ) + L1 f ( x1 ) + L2 f ( x 2 ) + L3 f ( x 3 ) + L4 f ( x4 ) , onde:
Resoluo:
Li ( x )=
do
tipo:
(x xj)
j = 0 ( xi
ji
xj)
L0 ( x) =
( x x1 )( x x 2 )( x x 3 )( x x 4 )
L0 (100) = 0,0077979156
( x 0 x1 )( x0 x 2 )( x 0 x3 )( x 0 x 4 )
L1 ( x) =
( x x 0 )( x x 2 )( x x 3 )( x x 4 )
L1 (100 ) = 0,0894176105
( x1 x0 )( x1 x 2 )( x1 x3 )( x1 x 4 )
L2 ( x) =
( x x 0 )( x x1 )( x x3 )( x x 4 )
L2 (100) = 0,9358195405
( x 2 x 0 )( x 2 x1 )( x 2 x 3 )( x2 x 4 )
L3 ( x ) =
( x x 0 )( x x1 )( x x 2 )( x x4 )
L3 (100) = 0,1640227184
( x 3 x 0 )( x 3 x1 )( x 3 x 2 )( x 3 x 4 )
L4 ( x) =
( x x 0 )( x x1 )( x x 2 )( x x3 )
L4 (100) = 0,0182225639
( x 4 x 0 )( x 4 x1 )( x 4 x 2 )( x 4 x3 )
Resposta:
P4 (100) = 1542,939247
LAURO / NUNES
Clculo Numrico
x 0 ( x graus)
15
30
45
60
75
90
sin x
0,25882
0,5
0,70711
0,86603
0,96593
1,0
Resoluo:
Ordem 0
0
Ordem 1
Ordem 2
Ordem 3
Ordem 4
0
0,0172546667
15
-0,0000392000
0,25882
0,0160786667
30
-0,0000008114
-0,0000757111
0,5
0,0138073333
45
-0,0000006973
-0,0001070889
0,70711
0,0105946667
60
0,0000000027
-0,0000005348
-0,0001311556
0,86603
0,0066600000
75
0,0000000019
0,0000000033
-0,0000003363
-0,0001462889
0,96593
0,0022713333
90
1,0
Resposta:
P4 (53) = 0,798646906
LAURO / NUNES
Clculo Numrico
Altura ( m )
192
180
150
115
72
Tempo ( s )
g
= 3 ,
2
g1(t ) = 1 , g 2 (t ) = t e g 3 (t ) = t 2 , tem-se:
Resoluo:
Fazendo h0 = 1 , v 0 = 2 ,
g1 , g1 g1 , g 2 g1 , g 3 1 g1 , f
g 2 , g1 g 2 , g 2 g 2 , g 3 2 = g 2 , f
g 3 , g1 g 3 , g 2 g 3 , g 3 3 g 3 , f
g1 , g1 = (1)(1)+(1)(1)+(1)(1)+(1)(1)+(1)(1) = 5
g1 , g 2 = (1)(1)+(1)(2)+(1)(3)+(1)(4)+(1)(5) = 15
g 2 , g1 = g1 , g 2 = 15
g1 , g 3 = (1)(1)+(1)(4)+(1)(9)+(1)(16)+(1)(25) = 55
g 3 , g1 = g1 , g 3 = 55
g 2 , g 2 = (1)(1)+(2)(2)+(3)(3)+(4)(4)+(5)(5) = 55
g 2 , g 3 = (1)(1)+(2)(4)+(3)(9)+(4)(16)+(5)(25) = 225
g 3 , g 2 = g 2 , g 3 = 225
g 3 , g 3 = (1)(1)+(4)(4)+(9)(9)+(16)(16)+(25)(25) = 979
g1 , f = (1)(192)+(1)(180)+(1)(150)+(1)(115)+(1)(72) = 709
g 2 , f = (1)(192)+(2)(180)+(3)(150)+(4)(115)+(5)(72) = 1822
g 3 , f = (1)(192)+(4)(180)+(9)(150)+(16)(115)+(25)(72) = 5902
Assim,
5 15 55 1 709
15 55 225 = 1822 = 199,8, = 1,7857 e = 4,7857
1
2
3
h0 = 199,8, v 0 = 1,7857 e
g
= 4,7857 g = 9,5714
2
LAURO / NUNES
Clculo Numrico
5
Aproximar a funo f ( x ) = sin( x ) por uma funo g ( x ) = 1 x + 2 x 2 no
intervalo I = [0,2]. Empregar a regra de Simpson com 4 subintervalos (2 n = 4) para
determinar os produtos internos do vetor dos termos independentes.
Exerccio 4
Resoluo:
g ( x )= 1 g 1 ( x )+ 2 g 2 ( x )= 1 + 2 x 2 , isto , g 1(x ) = x e g 2 ( x) = x 2 .
g1, g1 g1 , g 2 1 g1, f
g , g g , g = g , f
2 1
2
2 2
2
x3 8
x dx = =
3 0 3
g1 , g1 = x, x =
g1 , g 2 = x, x =
2
x4
x dx = = 4
4 0
3
g 2 , g1 = g1 , g 2 = 4
2
g2 , g 2 = x , x =
2
g1 , f = x, sin x =
x 5 32
x dx = =
5 0 5
4
0 xsin xdx =?
g 2 , f = x 2 , sin x =
0 x
sin xdx =?
0,5
1,0
1,5
2,0
x sin x
0,239713
0,841471
1,496242
1,818595
x 2 sin x
0,119856
0,841471
2,244364
3,63719
xn
f ( x) dx
n 1
n
h
[ f ( x0 ) + f ( x n ) + 2 f ( x 2i ) + 4 f ( x 2i 1 )]
3
i =1
i =1
g1 , f = x, sin x =
0 x sin xdx
0,5
[0 + 1,818595 + 2 (0,841471) + 4 (0,239713 + 1,496242) ] =1,740893
3
g 2 , f = x 2 , sin x =
0 x
sin xdx
0,5
[0 + 3,63719 + 2 (0,841471) + 4 (0,119856 + 2,244364)] =2,462835
3
Logo, tem-se:
8
3 4 1 1,740893
=
1 = 1,209727 e 2 = 0,371261
32 2 2,462835
4
5
Resposta:
g ( x ) = 1 x + 2 x 2 g ( x ) = 1,209727 x 0,371261x 2
LAURO / NUNES
Clculo Numrico
Exerccio 5
6
Sabendo-se que a dependncia funcional entre a carga Q de um condensador
0,5
0,6
0,7
0,8
0,9
1,0
Q (Coulomb)
4,78
3,97
3,30
2,75
2,29
1,9
Resoluo:
=
_____
g 2 , g1 g 2 , g 2 a2 g , log f
2
g1 = [1 1 1 1 1 1]T
log Q = [log 4,78 log 3,97 log 3,30 log 2,75 log 2,29 log 1,9]
g1 , g1 = (1)(1)+(1)(1)+(1)(1)+(1)(1)+(1)(1)+(1)(1) = 6
g1 , g 2 = (1)(0,5)+(1)(0,6)+(1)(0,7)+(1)(0,8)+(1)(0,9)+(1)(1,0) = 4,5
g 2 , g1 = g1 , g 2 = 4,5
g 2 , g 2 = (0,5)(0,5)+( 0,6)(0,6)+( 0,7)(0,7)+( 0,8)(0,8)+( 0,9)(0,9)+(1,0)(1,0) = 3,55
g1 , log Q = (1)( log 4,78)+(1)( log 3,97)+(1)( log 3,30)+(1)( log 2,75)+(1)( log 2,29)+
+(1)( log 1,9) = 2,874654
g 2 , log Q = (0,5)( log 4,78)+(0,6)( log 3,97)+(0,7)( log 3,30)+(0,8)( log 2,75)+
+(0,9)( log 2,29)+(1)( log 1,9) = 2,016020
6 4,5 a1 2,874654
4,5 3,55 a = 2,016020
Resolvendo
obtm-se:
a1 = 1,078983
a 2 = 0,799831.
Resposta:
Q = 1 10 2 t Q = 11,994524 10 0 ,799831t
LAURO / NUNES
Clculo Numrico
Calcule
Exerccio 6
2
0
Resoluo:
ETR
(b a )3
12n
max f ( x )
x[ a ,b ]
(b a )3
12n
max f ( x ) 10 1
x[ a ,b ]
0
0
2
2
max f ( x ) 10 1
(6,28319) 10 1 n 4,5 n = 5
2
2
x[ a ,b ]
12 n
12 n
0
(b a ) 2
Logo n = 5 h =
=
=
n
5
10
OBS. 1:
10
2
10
3
10
4
10
f ( x ) = x 2 cos x
0,0938655
0,3193871
0,5221087
0,4879801
n 1
h
[
f
(
x
)
+
f
(
x
)
+
2
0
n
f ( x i )]
0
2
i =1
f ( x )dx
Resposta:
2
0
x 2 cos(x ) dx 0,4471559
LAURO / NUNES
Clculo Numrico
2 ln( x)dx
Calcule
Exerccio 7
h=
Resoluo:
x
ln x
(b a ) ( 3 2 )
=
= 0,125
2n
8
2,125
2,250
2,375
2,500
2,625
2,750
2,875
[
f
(
x
)
+
f
(
x
)
+
2
f
(
x
)
+
4
0
n
2i f ( x 2i 1 )]
x0
3
i =1
i =1
0,125
[0,693147+1,098612+2(0,810930+0,916291+1,011601)+
3
4(0,753772+0,864997+0,965081+1,056053)]= 0,909542
3
2 ln( x)dx
| E SR |
E SR
(b a )5
4
2880n
(3 2 )5
max | f
x[ a ,b ]
( 4)
( x) |
max 6 x 4 E SR
2880 4 4 x[ 2,3]
3
Resposta:
(3 2 )5
2880 4
0,375= 5,086263 10 7
e E SR = 5,086263 10 7
___________________________________________________________________________
Exerccio 8
Vf
Vi
PdV .
V (m 3 )
1,5
2,0
2,5
3,0
3,5
4,0
4,5
P( Kg / m 2 )
80
72
64
53
44
31
22
Resoluo:
xn
f ( x) dx
n 1
n
h
[ f ( x0 ) + f ( x n ) + 2 f ( x 2i ) + 4 f ( x 2i 1 )]
3
i =1
i =1
(b a )
( 4,5 1,5)
h =
h = 0,5
2n
23
4 ,5
0 ,5
W = PdV
[80 + 22 + 2( 64 + 44 ) + 4( 72 + 53 + 31)]
1,5
3
h=
Resposta:
W 157
LAURO / NUNES
Clculo Numrico
d
y ( x ) = x + y com condio inicial
dx
y (0 ) = 1 . Considere o intervalo de integrao igual [0,4]. Solucione a equao diferencial pelo
Exerccio 9
mtodo de Euler (Passo Simples de ordem 1) com passos h =1, h =0,5 e h =0,25. Sabendo
que a soluo exata da equao diferencial y( x ) = 2e x x 1 , compare os resultados
obtidos em cada uma das integraes com os valores obtidos com a soluo exata.
y l +1 = y l + h f ( x l , y l ) , l = 0, 1, 2, , ( m 1 )
Resoluo:
Para h =1:
xl
yl
f ( xl , yl ) = xl + yl
3,436563657
1,436563657
11,7781122
6,778112198
12
15
36,17107385
24,17107385
27
31
104,1963001
77,19630007
y( x l ) = 2e xl xl 1 Erro= y ( xl ) y l
Para h =0,5:
xl
yl
f ( xl , yl ) = xl + yl
0,5
1,5
1,797442541
0,297442541
2,5
3,5
3,436563657
0,936563657
1,5
4,25
5,75
6,463378141
2,213378141
7,125
9,125
11,7781122
4,653112198
2,5
11,6875
14,1875
20,86498792
9,177487921
18,78125
21,78125
36,17107385
17,38982385
3,5
29,671875
33,171875
61,73090392
32,05902892
46,2578125
50,2578125
104,1963001
57,93848757
y( x l ) = 2e xl xl 1 Erro= y ( xl ) y l
Para h =0,25:
xl
yl
f ( xl , yl ) = xl + yl
0,25
1,25
1,5
1,318050833
0,068050833
0,5
1,625
2,125
1,797442541
0,172442541
0,75
2,15625
2,90625
2,484000033
0,327750033
1,0
2,8828125
3,8828125
3,436563657
0,553751157
y( x l ) = 2e xl xl 1 Erro= y ( xl ) y l
LAURO / NUNES
Clculo Numrico
1,25
3,85351563
5,103515625
4,730685915
0,87717029
1,5
5,12939453
6,629394531
6,463378141
1,333983609
1,75
6,78674316
8,536743164
8,759205352
1,972462188
2,0
8,92092896
10,92092896
11,7781122
2,857183243
2,25
11,6511612
13,90116119
15,72547167
4,074310479
10
2,5
15,1264515
17,62645149
20,86498792
5,738536429
11
2,75
19,5330644
22,28306437
27,53526377
8,002199403
12
3,0
25,1038305
28,10383046
36,17107385
11,06724339
13
3,25
32,1297881
35,37978807
47,33067983
15,20089176
14
3,50
40,9747351
44,47473509
61,73090392
20,75616883
15
3,75
52,0934189
55,84341886
80,292164
28,19874514
16
4,0
66,0542736
70,05427358
104,1963001
38,14202649
10
d
y ( x ) = x + y com condio inicial
dx
y (0 ) = 1 . Considere o intervalo de integrao igual [0,4]. Solucione a equao diferencial pelo
Exerccio 10
mtodo de Runge-Kutta de ordem 2 com passo h =0,5. Sabendo que a soluo exata da
equao diferencial y( x ) = 2e x x 1 , compare os resultados obtidos em cada uma das
integraes com os valo res obtidos com a soluo exata.
y l +1 = y l +
Resoluo:
h
( K1 + K 2 ) , l = 0, 1, 2, , m 1
2
K1 = f ( x l , y l ) e K 2 = f ( x l + h, y l + h K1 )
xl
yl
K1
K2
y( x l ) = 2e xl xl 1
Erro= y ( xl ) y l
1,0000
1,0000
2,0000
1,0000
0,0000
0,5
1,7500
2,2500
3,8750
1,7974
0,0474
3,2813
4,2813
6,9219
3,4366
0,1553
1,5
6,0820
7,5820
11,8730
6,4634
0,3813
10,9458 12,9458
19,9187
11,7781
0,8323
2,5
19,1619 21,6619
32,9929
20,8650
1,7031
32,8256 35,8256
54,2384
36,1711
3,3454
3,5
55,3416 58,8416
88,7625
61,7309
6,3893
104,1963
11,9536
LAURO / NUNES