You are here:

Calculus/Euler's Method

Advertisement


Question
Scotto, Hope all is well with you.  I need your help!
a)Use Euler's Method with step size h = 0.1, 0.05, 0.02, 0.01, 0.005 to approximate the solution to the initial value problem: dy/dx = x*(y^1/2), y(1) = 4 at the points x = 2.5.  (That is, x belongs[1, 2.5]
b) can you find the exact solution?
c) Plot the approximate solution (s) agains the exact solution (we are using MatLab to graph).
d) does the error converge to 0 as h ->0?

I have not take diff equations yet and this is a 2301 class.  Please advice. Thanks!

Regards,

Evelyn Saravia

Answer
Don't worry - I know the other people will get this as well,
but it is suppose to be private if it has my name.
It doesn't bother me, though, to know others can look at this too.

I know Euler's equation is e^(ix) = cos(x) + isin(x), but not yet Euler's Method.
One moment while I look for it.

Ah yes, here it is.  I looked in http://www.swarthmore.edu/NatSci/echeeve1/Ref/NumericInt/Euler1.html

It says to approximate the value at the next place by using the difference from the last two.
I can see you are suppose to start at x=1, where y is 4, and proceed out to x=2.5 by
h = 0.1,0.05, 0.02, 0.01, and 0.005.

By h=0.1, there will be 25 steps.
By h=0.05, there will be 50 steps.
By h=0.02, there will be 125 steps.
By h=0.01, there will be 250 steps.
By h=0.005, there will be 500 steps.

To solve this, you don't need differential equations, just a formula for dy/dx.
To approximate the value at the next point, just use the values at the point that is known.

By this, we have y(1) = 4 and dy/dx = x√y, so dy/dx = 1√4 = 2.
At x = 1.1 (using the first h of 0.1), y(1.1) = y(1) + h(dy/dt) = 4 + 0.1(2) = 4.2.
Using x = 1.1, y = 4.2, and dy/dx = 1.1√4.2, y(1.2) can be found.
Proceed until you get to 2.5.

The best way to do this is in Excel, for once you have the first update row,
the rest can be done with a copy down.

I did it in a spreadsheet and got 8.134270098 for h=0.1, 8.206918381 for h = 0.05,
8.25131216 for h = 0.02, 8.266246613 for h = 0.01, and 8.273739664f for h = 0.005.

I can transfer the sheet to a picture file, but the formulas won't be seen.
The next x is calculated as x+h.
The next y is found as the old y plus the derivative * h.
The new y' is found as x*y^0.5, where x and y are in the current row.

Calculus

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scotto

Expertise

Any kind of calculus question you want. I also have answered some questions in Physics (mass, momentum, falling bodies), Chemistry (charge, reactions, symbols, molecules), and Biology.

Experience

Experience in the area: I have tutored students in all areas of mathematics for over 25 years. Education/Credentials: BSand MS in Mathematics from Oregon State University, where I completed sophomore course in Physics and Chemistry. I received both degrees with high honors. Awards and Honors: I have passed Actuarial tests 100, 110, and 135.

Publications
Maybe not a publication, but I have respond to well oveer 7,500 questions on the PC. Well over 2,000 of them have been in calculus.

Education/Credentials
I aquired well over 40 hours of upper division courses. This was well over the number that were required. I graduated with honors in both my BS and MS degree from Oregon State University. I was allowed to jump into a few junior level courses my sophomore year.

Awards and Honors
I have been nominated as the expert of the month several times. All of my scores right now are at least a 9.8 average (out of 10).

Past/Present Clients
My past clients have been students at OSU, students at the college in South Seattle, referals from a company, friends and aquantenances, people from my church, and people like you from all over the world.

©2012 About.com, a part of The New York Times Company. All rights reserved.