You are on page 1of 3

ESCUELA SUPERIOR POLITECNICA DEL LITORAL

INSTITUTO DE CIENCIAS MATEMATICAS


ANALISIS NUMERICO
SEGUNDA EVALUACION GUAYAQUIL, 31 DE ENERO DE 2012

Nombre:…Luis Rodríguez Ojeda…………………….……Paralelo:……..

1. Aproximar la siguiente integral:


3
ln x

2
4
3− x
dx

Usar Simpson con n =6.

Se debe eliminar la singularidad mediante una sustitución

=
u 4
3−x, ⇒ x= 3 − u4 ⇒ dx = −4u3 du

3 ln x 0 ln(3 − u4 ) 1
A= ∫ 2 4
3−x
dx = ∫
1 u
(−4u3 du = ∫ 0
4 ln(3 − u4 )u2du

Fórmula de Simpson, n=8 ⇒ h=0.125

h
A= [f0 + 4f1 + 2f2 + 4f3 + 2f4 + 4f5 +2f6 + 4f7 + f8],
3

=
f(u) 4 ln(3 − u4 )u2

0.125
A= [f(0)+4f(0.125)+2f(0.25)+4f(0.375)+2f(0.5)+4f(0.625)+2f(0.75)+4f(0.875)+f(1)]
3

= 1.2482
2. Resolver el problema de valor inicial:
dy y
− = xe x , y (1) = e − 1 , 1 ≤ x ≤ 3
dx x
a) Escribir el algoritmo de Runge-Kutta de cuarto orden para la función específica f ( x, y ) .
b) Escribir una tabla de resultados, con h = 0.2 .

Algoritmo de Runge-Kutta de cuarto orden

K1 = hf(xi, yi)
K2 = hf(xi + h/2, yi + K1/2)
K3 = hf(xi + h/2, yi + K2/2)
K4 = hf(xi + h, yi + K3)
1
yi+1 = yi + (K1 + 2K2 + 2K3 + K4)
6
xi+1 = xi + h, i = 0, 1, 2, ...

Tabla de resultados, h=0.2


x
y'(x) = f(x,y) = y/x + x e , 1≤x≤3

x K1 K2 K3 K4 y
1.0 1.7183
1.2 0.8873 1.0540 1.0691 1.2614 2.7841
1.4 1.2608 1.4793 1.4961 1.7469 4.2772
1.6 1.7465 2.0312 2.0502 2.3759 6.3248
1.8 2.3756 2.7450 2.7667 3.1880 9.0893
2.0 3.1878 3.6652 3.6903 4.2336 12.7780
2.2 4.2334 4.8483 4.8776 5.5761 17.6549
2.4 5.5760 6.3658 6.4001 7.2957 24.0555
2.6 7.2957 8.3075 8.3480 9.4937 32.4056
2.8 9.4939 10.7871 10.8350 12.2976 43.2448
3.0 12.2979 13.9475 14.0044 15.8679 57.2564
3. Aproxime la solución de la ecuación diferencial parcial:
 ∂u ∂ 2u
 ∂t − ∂x= 2
2 , 0 ≤ x ≤1 , t > 0

 u ( 0,=t ) u (1,=t) 0 , t > 0
 u ( x, 0=) senπ x + x (1 − x )


Con h = 0.25 y k = 0.04 , realizar solo dos iteraciones en el tiempo ( j = 1, 2 ) .
Indicación: Para establecer el algoritmo, utilice la fórmula progresiva para la primera derivada.

Sustituyendo las derivadas por aproximaciones de diferencias finitas


∂ui,j ui,j+ 1 − u i,j
= + O(∆y)
∂y ∆y
∂ 2ui,j ui + 1,j − 2u i,j +ui −1,j
= + O(∆x)2
∂x 2 (∆x)2

Ecuación de diferencias, ∆x=h=0.25, ∆t=k=0.04


ui,j+ 1 − u i,j ui + 1,j − 2u i,j +ui −1,j 2
- = 2, Error de truncamiento E = O(∆x) + O(∆t).
∆t (∆x)2

Es un método explícito
∆t
ui,j+ 1= ui,j + (ui −1,j − 2ui,j + ui + 1,j ) + 2∆t
(∆x)2
=
ui,j + 0.64ui −1,j − 2(0.64)ui,j + 0.64ui + 1,j + 0.08

ui,j+ 1 = 0.64ui −1,j − 0.28ui,j + 0.64ui + 1,j + 0.08

Condiciones en los bordes

Cálculos

ui,j+ 1 = 0.64ui −1,j − 0.28ui,j + 0.64ui + 1,j + 0.08

u1,1 = 0.64u0,0 − 0.28u1,0 + 0.64u2,0 + 0.08


= 0.64(0) − 0.28(0.8946) + 0.64(1.25) + 0.08= 0.6295
u2,1 = 0.64u1,0 − 0.28u2,0 + 0.64u3,0 + 0.08
= 0.64(0.8946) − 0.28(1.25) + 0.64(0.8946) = + 0.08 0.8751
u3,1 = 0.64u2,0 − 0.28u3,0 + 0.64u4,0 + 0.08
= 0.64(1.25) − 0.28(0.8946) + 0.64(0) + 0.08
= 0.6295 (simétrico)
Etc.

You might also like