roam
- 1,265
- 12
Homework Statement
I need some help with the last part of the following problem:
http://img834.imageshack.us/img834/8366/eulere.jpg
The Attempt at a Solution
My approximation to the solution to the IVP at t=-0.8 using 1 step of the Euler's method was:
x(-0.8)=0.8
Whereas the approximation with 1 step of 4th order Runge-Kutta method was:
x(-0.8)=0.8214
And since the exact solution is
x(-0.8) = e^{-0.8 +1} -2 \times (-0.8) -2 = 0.8214027582
the error in Euler's method would be
|0.8214027582-0.8| =0.0214027582
And the error for Runge-Kutta is
|0.8214027582-0.8214| =2.7582 \times 10^{-6}
I'm stuck here. So how many steps does Euler's method take to produce an answer with an error no larger than 2.7582 x 10-6 (the error of Runge-Kutta)?
I tried to use the following equation:
e_n \leq \frac{k}{n}
Where k is a constant and n is the number of steps and en is the error. I then tried to solve for the constant bu substituting in the values from Euler's method:
0.021402758 = \frac{k}{1} \ \implies k =0.021402758
Then substituting in the new error
2.7582 \times 10^{-6}=\frac{0.021402758}{n} \ \implies n = 7760
But doesn't 7760 steps seem too much? Where did I go wrong? I appreciate it if anyone could help me with this problem.
Last edited by a moderator: