# Computing approximate Solutions/ Euler's Method

• Feb 19th 2014, 09:42 PM
crownvicman
Computing approximate Solutions/ Euler's Method
Given the equation dy/dt= t-(y^2) compute 2 approx. solutions corresponding to delta t = 1 and delta t = 0.5 on the interval [0,1]. I've included a photo of my work and was wondering if someone could check it for me to see if I did it correctly. I think the solution for delta = 1 and the graph is correct but for delta = 0.5 I'm not sure. Thank you
• Feb 19th 2014, 09:44 PM
crownvicman
Re: Computing approximate Solutions/ Euler's Method
• Feb 20th 2014, 04:31 PM
ryotiger
Re: Computing approximate Solutions/ Euler's Method
Hi

But, personnally, here is how I would write the answer (I do not be in the habit of making tables).

If you set \$t_0=0\$, \$t_1=0.5\$, \$t_2=1\$ and \$y_0=y(0)\$, \$y_1=y(0.5)\$, \$y_2=y(1)\$, (explicit) Euler's method consists in calculating \$y_1\$ and \$y_2\$ from the following equation :
\$\$
y_{i+1}=y_i+(t_{i+1}-t_i).(t_i-y_i^2)
\$\$

Since \$y_0=y(0)=0\$, we thus obtain
\$\$
y_1=y(0.5)=0.5
\$\$
and
\$\$
y_2=y(1)=0.625
\$\$
• Feb 20th 2014, 05:18 PM
Prove It
Re: Computing approximate Solutions/ Euler's Method
Quote:

Originally Posted by ryotiger
(I do not be in the habit of making tables).

Why not? It's the most clear and concise method of organising all the important pieces of information needed when doing these numerical methods...
• Feb 20th 2014, 05:56 PM
ryotiger
Re: Computing approximate Solutions/ Euler's Method
Yes, you are right, I did not say the opposite.
It's just a habit that I took to write in words the calculations to help understanding when I write scientific papers or when I teach. But if only the answer is expected, a table can be sufficient. It's only a personal opinion.