How many steps does Euler's method take to achieve a specific error tolerance?

  • Thread starter Thread starter roam
  • Start date Start date
  • Tags Tags
    Method
Click For Summary

Homework Help Overview

The discussion revolves around determining the number of steps required in Euler's method to achieve a specific error tolerance when approximating a solution to an initial value problem (IVP). The context involves comparing Euler's method to the 4th order Runge-Kutta method and analyzing the associated errors.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the calculation of the number of steps needed for Euler's method based on an error equation. Questions arise regarding the validity of the method used to derive the number of steps and the source of the error equation.

Discussion Status

Some participants express uncertainty about the method for finding the number of steps, while others suggest confirming the calculations through programming or spreadsheet methods. There is an acknowledgment of the potential correctness of the approach taken.

Contextual Notes

Participants reference a specific error equation from a textbook, indicating that the source of their method is established, but there is still questioning about its application in this context.

roam
Messages
1,265
Reaction score
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:
Physics news on Phys.org
7760 seems to be OK. You could confirm this using a program or a spreadsheet with Δt = (0.2 / 7760) to see if it corresponds with your answer.
 
Last edited:
But I am wondering if I've even used the correct method for finding the number of steps?
 
roam said:
I tried to use the following equation:
e_n \leq \frac{k}{n}
roam said:
But I am wondering if I've even used the correct method for finding the number of steps?
What was the source of the error equation you used, class notes, a textbook, ... ?
 
rcgldr said:
What was the source of the error equation you used, class notes, a textbook, ... ?

It's from a textbook...

Edit: page 635 of the textbook called "Differential Equations" by Blanchard, Devany and Hall.
 
Last edited:
roam said:
I am wondering if I've even used the correct method for finding the number of steps?
It appears that you have. As mentioned before if you want to check this, you could confirm this using a program or a spreadsheet using Euler method with Δt = (0.2 / 7760) to see if it corresponds with your answer (for the spread sheet you would need to use 7761 rows, the initial state and 7760 steps).
 

Similar threads

Replies
4
Views
4K
  • · Replies 65 ·
3
Replies
65
Views
8K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
5K
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
2K
Replies
2
Views
3K