12.05.2013 Views

Problemas resueltos de Cálculo Numérico

Problemas resueltos de Cálculo Numérico

Problemas resueltos de Cálculo Numérico

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

20 1. PROBLEMAS RESUELTOS DE CÁLCULO NUMÉRICO<br />

Simpson para estimar el valor <strong>de</strong> la integral en cada uno <strong>de</strong> los subintervalos.<br />

1<br />

0<br />

cos √ x dx =<br />

1<br />

2 − 0<br />

6<br />

1<br />

12<br />

1<br />

2<br />

0<br />

<br />

f(0) + 4f<br />

<br />

f(0) + 4f<br />

cos √ x dx +<br />

1<br />

4<br />

<br />

1<br />

4<br />

<br />

+ f<br />

<br />

+ 2f<br />

1<br />

1<br />

2<br />

<br />

1<br />

2<br />

1<br />

2<br />

cos √ x dx <br />

<br />

+ 1 − 1<br />

2<br />

<br />

+ 4f<br />

6<br />

3<br />

4<br />

<br />

1 3<br />

f + 4f + f(1) =<br />

2 4<br />

<br />

+ f(1) =<br />

1<br />

[1 + 4(0.877583) + 2(0.760244) + 4(0.647860) + 0.54302] = 0.763547<br />

12<br />

En este caso po<strong>de</strong>mos calcular el valor exacto <strong>de</strong> la integral. En efecto, efectuando el cambio <strong>de</strong><br />

variable x = t2 se obtiene:<br />

1<br />

0<br />

cos √ x dx =<br />

x = t 2<br />

dx = 2t dt =<br />

1<br />

0<br />

2t cos t dt=<br />

u = 2t ⇒ du = 2 dt<br />

dv = cos t dt ⇒ v = sen t<br />

= [2t sen t + 2 cos t] 1<br />

0 = 2 sen 1 + 2 cos 1 − 2 = 0.763547.<br />

4. Resolución numérica <strong>de</strong> ecuaciones diferenciales<br />

23. Consi<strong>de</strong>remos el problema <strong>de</strong> valores iniciales<br />

y ′ = x 2 y − 1.2y , y(0) = 1 .<br />

(a) Resolverlo <strong>de</strong> manera analítica.<br />

(b) Calcular una solución aproximada en el intervalo [0, 2] aplicando el método <strong>de</strong> Euler<br />

con h = 0.5, h = 0.25 y h = 0.1. Comparar los resultados obtenidos con los valores<br />

exactos.<br />

SOLUCIÓN:<br />

(a) La ecuación diferencial pue<strong>de</strong> resolverse mediante separación <strong>de</strong> variables<br />

Por integración se llega a<br />

dy<br />

dx = (x2 − 1.2)y ⇒ dy<br />

y = (x2 − 1.2)dx.<br />

ln y = 1<br />

3 x2 − 1.2 x + c ⇒ y = k e 1<br />

3 x2 −1.2x .<br />

Al imponer las condiciones iniciales, y(0) = 1, se obtiene k = 1, luego la solución vendrá<br />

dada por<br />

y(x) = e 1<br />

3 x2 −1.2x .<br />

(b) Tomando la función f(x, y) = x 2 y − 1.2y, el método <strong>de</strong> Euler con paso h nos proporciona<br />

las aproximaciones<br />

yk+1 = yk + h f(xk, yk) = yk + h(x 2 kyk − 1.2yk) , k = 0, 1, · · · ,<br />

partiendo <strong>de</strong> y0 = y(0) = 1, don<strong>de</strong> xk = k h.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!