10.05.2013 Views

texto: metodos numericos para ecuaciones diferenciales ordinarias

texto: metodos numericos para ecuaciones diferenciales ordinarias

texto: metodos numericos para ecuaciones diferenciales ordinarias

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.

1 − 0<br />

Para h = 0.05 tenemos n = = 20. Se digitó >>euler(20, 0, 1, 0.05)<br />

0.05<br />

1 − 0<br />

Para h = 0.01 tenemos n = = 100. Se digitó >>euler(10, 0, 1, 0.01)<br />

0.01<br />

Se obtuvo los siguientes valores<br />

xn<br />

yn<br />

h=0.1 h=0.05 h=0.01<br />

0.0 2.000000000000000 2.000000000000000 2.000000000000000<br />

0.1 2.000000000000000 2.002500000000000 2.004382075008805<br />

0.2 2.010000000000000 2.014506250000000 2.017906937597231<br />

0.3 2.029000000000000 2.035091890625000 2.039700373388280<br />

0.4 2.056100000000000 2.063420431289063 2.068971758569680<br />

0.5 2.090490000000000 2.098736939238379 2.105006067137536<br />

0.6 2.131441000000000 2.140360087662637 2.147156642390761<br />

0.7 2.178296900000000 2.187674979115530 2.194838659600207<br />

0.8 2.230467210000001 2.240126668651766 2.247523213763810<br />

0.9 2.287420489000001 2.297214318458219 2.304731972678324<br />

1.0 2.348678440100001 2.358485922408543 2.366032341273229<br />

donde y(1) ≈ 2.348678440100001 <strong>para</strong> h=0.1, y(1) ≈ 2.358485922408543 <strong>para</strong> h=0.05 e<br />

y(1) ≈ 2.366032341273229 <strong>para</strong> h=0.01.<br />

Utilizando la solución analítica de la ecuación diferencial tenemos los siguientes valores:<br />

xn y = e −x + x + 1<br />

0.0 2.000000000000000<br />

0.1 2.004837418035960<br />

0.2 2.018730753077982<br />

0.3 2.040818220681718<br />

0.4 2.070320046035640<br />

0.5 2.106530659712633<br />

0.6 2.148811636094027<br />

0.7 2.196585303791410<br />

0.8 2.249328964117222<br />

0.9 2.306569659740599<br />

1.0 2.367879441171442<br />

donde y(1) = 2.367879441171442<br />

Notemos que cuando se reduce el tamaño de paso h se obtiene una mejor aproximación,<br />

4

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

Saved successfully!

Ooh no, something went wrong!