Download - Aula7-Integração Numérica-Parte1
![Page 1: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/1.jpg)
7. INTEGRAÇÃO NUMÉRICAParte 1
7.1 Introdução
7.2 Fórmulas de Newton-Cotes
7.2.1 Regra dos Trapézios
7.2.2 Regra dos Trapézios Repetida
7.2.3 Regra 1/3 de Simpson
7.2.3 Regra 1/3 de Simpson Repetida
7.2.4 Regra 3/8 de Simpson (Selma Arenales)
7.2.5 Teorema Geral do Erro
![Page 2: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/2.jpg)
INTEGRAÇÃO NUMÉRICA7.1 INTRODUÇÃO
Se é uma função contínua em , então existe a função primitiva , tal que
Problema 1: Na maioria das vezes pode não ser fácil expressar através das funções ditas elementares.
Problema 2: Em alguns casos temos apenas uma tabela de . Como calcular ?
Nestes casos calculamos numericamente!!!
)(xf ].[ ba)(xF )()( xfxF
)()()( aFbFdxxfb
a
)(xF
)(xf dxxfb
a)(
dxxfb
a)(
![Page 3: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/3.jpg)
INTEGRAÇÃO NUMÉRICA7.1 INTRODUÇÃO
Idéia básica. Para calcular numericamente vamos expressar como um polinômio no inter-
valo . Deduziremos expressões que têm a forma
onde Quando escrevemos uma integral na forma (1), estamos implementando o formalismo de Newton-Cotes.
].[ ba
(1) )(....)()()( 1100 nn
b
axfAxfAxfAdxxf
)(xfdxxf
b
a)(
.,...,2,1 com , nibaxi
![Page 4: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/4.jpg)
INTEGRAÇÃO NUMÉRICA7.2 FÓRMULAS DE NEWTON-COTES
No procedimento de Newton-Cotes o polinômio aproxima em pontos de , igualmente espaçados. Se os subintervalos têm comprimento
, então as fórmulas fechadas de Newton-Cotes para integração têm a forma
],[ ba)(xf
h
nabhxx
xfAxfAxfAxfA
dxxfdxxf
ii
ii
n
inn
x
x
b
a
n
/)( onde
)(....)()(
)()(
1
01100
0
![Page 5: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/5.jpg)
INTEGRAÇÃO NUMÉRICA7.2 FÓRMULAS DE NEWTON-COTES
Comentário 1: Os coeficientes das formas fechadas de Newton-Cotes são determinados de acordo como grau do polinômio aproximador de .
Comentário 2: As formas abertas de Newton-Cotes, construídas de forma análoga às fechadas, diferem pelo fato que
iA
)(xf
., e 0 baxx n
![Page 6: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/6.jpg)
INTEGRAÇÃO NUMÉRICA7.2.1. REGRA DOS TRAPÉZIOS
Utilizando a Forma de Lagrange para expressar ,
que interpola em obtemos:
)(1 xp
,, e 10 baxx )(xf
)()(2
)()(
)()(
10
10
01
1
1
0
1
0
xfxfh
I
Idxxfh
xxxf
h
xx
dxxpdxxf
T
T
x
x
bx
ax
b
a
![Page 7: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/7.jpg)
INTEGRAÇÃO NUMÉRICA7.2.1. REGRA DOS TRAPÉZIOS
Note que é a área do trapézio de altura
e de base .TI
01 xxh )(e)( 10 xfxf
)(xf
)( 0xf
)( 1xf
1xb 0xa
![Page 8: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/8.jpg)
INTEGRAÇÃO NUMÉRICA7.2.1. REGRA DOS TRAPÉZIOS
Ao substituir a área sob a curva pela área
do trapézio estamos realizando uma aproxima-
ção e cometendo um erro. Verifica-se que este
erro é dado por
)(xf
baccfh
E
Exfxfh
dxxf
T
T
bx
ax
, onde )(12
com
)()(2
)(
3
10
1
0
![Page 9: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/9.jpg)
INTEGRAÇÃO NUMÉRICA7.2.2. REGRA DOS TRAPÉZIOS REPETIDA
Quando o intervalo é grande, devemos fazer várias subdivisões e aplicar a regra do trapézio repetidas vezes. Sendo
ba,
mihxx ii ,....,2,1,0 com 1
1
3
10
0
, onde12
)()(2
)()(1
iiii
ii
m
i
x
x
m
i
b
a
xxccfh
xfxfh
dxxfdxxfi
i
![Page 10: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/10.jpg)
INTEGRAÇÃO NUMÉRICA7.2.2. REGRA DOS TRAPÉZIOS REPETIDA
O erro cometido em aplicar vezes a regra do trapézio é
Graficamente
bafh
mETR , com 12
3
m
h
![Page 11: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/11.jpg)
INTEGRAÇÃO NUMÉRICA7.2.2. REGRA DOS TRAPÉZIOS REPETIDA
Exemplo1: Considere a integral
a) Calcule uma aproximação para a integral utilizando 10 subintervalos e a regra do trapézio repetida. Estime o erro cometido.
b) Qual é o número mínimo de subdivisões, de modo que o erro seja inferior a .
dxe x1
0
310
![Page 12: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/12.jpg)
INTEGRAÇÃO NUMÉRICA7.2.2. REGRA DOS TRAPÉZIOS REPETIDA
Solucão. a) Fazendo 10 subintervalo no intervalo
temos e .
Aplicando a regra do trapézio repetida,
Estimativa do erro:
719713.1
2...2222
1.0
1
0
0.19.03.02.01.001
0
dxe
eeeeeedxe
x
x
]1,0[
10,..,2,1 para 1.0 iixi1.0h
1,0 com 12
1.010 3
eETR
003.000227.0 12/01.0 eETR 003.0720.11
0 dxe x
![Page 13: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/13.jpg)
INTEGRAÇÃO NUMÉRICA7.2.2. REGRA DOS TRAPÉZIOS REPETIDA
Solucão. b) Para obter erro de temos que
Como subintervalos.
310
1603759.151
mh
m
0665.000441.01012
h
12
101
onde 12
10
32
23
33
he
eh
mhe
hm
![Page 14: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/14.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON
Utilizando a Forma de Lagrange para expres-
sar , que interpola nos pontos
, segue que
)(2 xp
bhxxhxxx 2 e e a 02010
)(xf
)()(
)()(
21202
101
2101
20
02010
212
xfxxxx
xxxxxf
xxxx
xxxx
xfxxxx
xxxxxp
![Page 15: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/15.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON
ou ainda
)()(4)(32
)(
)(
2
)(
)()(
2101022
2021
2120
2
2
0
2
0
2
0
2
0
xfxfxfh
Idxxxxxh
xf
dxxxxxh
xfdxxxxx
h
xfI
Idxxpdxxf
S
x
x
x
x
x
xS
S
bx
ax
b
a
)(2
)()(2
)( 210
120
021
2 xfhh
xxxxxf
hh
xxxxxf
hh
xxxxxp
Regra 1/3 de Simpson
![Page 16: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/16.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON
De modo análogo à Regra do Trapézio, na Re-
gra 1/3 de Simpson estamos realizando uma
aproximação e cometendo um erro. Verifica-se
que este erro é dado por
20
5
210
, onde )(90
com
)()(4)(3
)(2
0
xxccfh
E
Exfxfxfh
dxxf
ivS
T
bx
ax
Note o ganho no erro ao passar da aproximação linear para a quadrática
![Page 17: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/17.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON REPETIDA
Novamente, quando o intervalo é grande,
a solução é fazer várias subdivisões e aplicar a
regra 1/3 de Simpson repetidas vezes. Sendo
aplicando Simpson 1/3 em um subintervalo:
ba,
mihxx ii ,....,2,1,0 com 1
iii
iiv
iii
x
x
xxc
cfhxfxfxf
hdxxf
i
i
, onde
90)()(4)(
3)(
2
5
122
![Page 18: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/18.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON REPETIDA
Considerando todos subintervalos
onde
90
})()(4)(.....
)()(4)()()(4)({3
)(
52/
112
432210
SRSRi
ivm
immm
b
a
EIcfh
xfxfxf
xfxfxfxfxfxfh
dxxf
902
})()(4)(....
)()(4)()()(4)({3
5
12
432210
iiv
SR
mmm
SR
cfhmE
xfxfxf
xfxfxfxfxfxfh
I
Agora temos m/2 subintervalos
![Page 19: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/19.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON REPETIDA
Exemplo1: Considere a integral
a) Calcule uma aproximação para a integral utilizando 10 subintervalos e a regra 1/3 de Simpson repetida. Estime o erro cometido.
b) Qual é o número mínimo de subdivisões, de modo que o erro .
dxe x1
0
310
![Page 20: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/20.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON REPETIDA
Solucão. a) Fazendo 10 subintervalo no intervalo
temos e .
Aplicando a regra do trapézio repetida,
Estimativa do erro:
718282788.1
42...24243
1.0
1
0
0.19.08.04.03.02.01.001
0
dxe
eeeeeeeedxe
x
x
]1,0[
10,..,2,1 para 1.0 iixi1.0h
1,0 com 90
1.05 5
eETR
665 1021051.1 18/10 eETR 000002.0718283.11
0 dxe x
![Page 21: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/21.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON REPETIDA
Solucão. b) Para obter um erro inferior a
Como subintervalos.
Note a convergência rápida da regra 1/3 de Simpson
310
29713.11
mh
m
50728.006622.0h
180
101
onde 902
10
4
43
53
h
eh
mhe
hm
![Page 22: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/22.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON X TRAPÉZIO
1. A convergência da regra 1/3 de Simpson é mais rápida do que a convergência da regra do Trapézio.
2. As demais fórmulas fechadas de integração de Newton-Cotes trabalham com polinômios de graus n=3, n=4,...
3. Para um n qualquer, a fórmula de Newton –Cotes é apresentada no próximo slide.
![Page 23: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/23.jpg)
INTEGRAÇÃO NUMÉRICA7.2.3. REGRA 1/3 DE SIMPSON X TRAPÉZIO
Fórmula de Newton-Cotes para n qualquer
)(
)(....)()(
)()(...)()()()(
)()(...)()()()(
Lagrange de forma utilizando )()(
0
000
0
00
1100
1100
1100
n
nnn
n
nn
x
xii
nn
x
xnn
x
x
x
x
nn
x
x
n
x
x
xb
xa
dxxLA
xfAxfAxfA
dxxLxfdxxLxfdxxLxf
dxxLxfxLxfxLxf
dxxpdxxf
![Page 24: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/24.jpg)
INTEGRAÇÃO NUMÉRICA7.2.4. REGRA 3/8 DE SIMPSON
Utilizando a Forma de Lagrange para expressar ,
que interpola nos pontos:
segue que
)(3 xp
bhxxhxxhxxx 3 e 2 e e a 0302010
)(xf
)(
)()(
)()(
3231303
210
2321202
3101
312101
320
03'2010
3213
xfxxxxxx
xxxxxx
xfxxxxxx
xxxxxxxf
xxxxxx
xxxxxx
xfxxxxxx
xxxxxxxp
![Page 25: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/25.jpg)
INTEGRAÇÃO NUMÉRICA7.2.4. REGRA 3/8 DE SIMPSON REPETIDA
Integrando
)()(3)(3)(
8
3
)()(
32108/3
8/38/38/33
3
0
xfxfxfxfhI
EIEdxxpdxxf
S
SSS
bx
ax
b
a
Regra 3/8 de Simpson
cfhE ivS
58/3 80
3 30 , onde xxc
![Page 26: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/26.jpg)
INTEGRAÇÃO NUMÉRICA7.2.4. REGRA 3/8 DE SIMPSON REPETIDA
Considerando todos subintervalos
Enfim, o erro cometido pela regra 3/8 de Simpson é
})()(3)(3)(
....)()(3)(3)(
)()(3)(3)({8
3)(
123
7654
3210
mmmm
b
a
xfxfxfxf
xfxfxfxf
xfxfxfxfhdxxf
],[ onde 80
3
35
8/3 baccfhm
E iiiv
SR
Neste caso temos m/3 subintervalos
![Page 27: Aula7-Integração Numérica-Parte1](https://reader036.vdocuments.mx/reader036/viewer/2022062312/552a189855034663028b46f2/html5/thumbnails/27.jpg)
INTEGRAÇÃO NUMÉRICA7.2.5. TEOREMA GERAL DO ERRO
“O erro na integração numérica, utilizando fórmu-
las de Newton-Cotes, é
caso 1:
Caso 2:
impar é se , para
...1!1 0
12
nbac
dunuuucfn
hE
i
n
in
n
n
par é se , para
...12!2 0
23
nbac
dunuuun
ucfn
hE
i
n
in
n
n