Eulers Method - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Eulers Method

Description:

Euler-Cromer Method. The local truncation error in the Euler-Cromer Method ... The Euler-Cromer Method conserves the total energy for oscillatory motions over ... – PowerPoint PPT presentation

Number of Views:234
Avg rating:3.0/5.0
Slides: 21
Provided by: cass76
Category:
Tags: cromer | eulers | method

less

Transcript and Presenter's Notes

Title: Eulers Method


1
Eulers Method
Last time we had look at a Taylor series
expansion of v(t0)
where the error term is not explicitly known
Label the steps in t with ti t0 idt,
---gtgt sequence in y
For small stepsize dt, we have a scheme for
approximately solving the initial value problem.

---gt Explicit Euler Scheme
2
Eulers Method for Higher Order Systems
So far we have considered 1st order ODEs
Many differential equations are however 2nd or
higher order
We can always reduce a higher order ODE into sets
of 1st order ODEs
can be split into two first order equations by
introducing a new variable
Resulting 1st order equations are equivalent to
the 2nd order equations

3
Eulers Method for Higher Order Systems
Once we have obtained the set of two 1st order
equations, we can use Eulers Method using both
equations
Eulers Method is then in pseudo-code
Initial (x, y, z) yn1 yn fy(xn, yn, zn)
?x zn1 zn fz(xn, yn , zn) ?x xn1 xn
?x Repeat

4
Simple Harmonic Motion
Lets assume an a pendulum of mass m is connected
by a massless string to a rigid support.
From Newtons 2nd law we know
Lets assume ? is small, so sin? ?

5
Simple Harmonic Motion
Our basic equation of motion is the second order
ODE
To solve this numerically it is convenient to
rewrite this as two first-order ODEs

Next, convert these two equations into difference
equations, using a time step ?t
6
Simple Harmonic Motion
Using the Euler method, we get
We use the values at time step i to estimate
their values at time step i1
with ?i and ?i be the angular displacement and
velocity at time step i.

7
Simple Harmonic Motion
Example Length 1m Initial Displacement
10o Initial Velocity 0 m/s Time Step 0.02 s

8
Simple Harmonic Motion
Time Step 0.02 s, 100 Points/Period
Exact Euler

9
Simple Harmonic Motion
Time Step 0.01 s, 200 Points/Period
Exact Euler

10
Simple Harmonic Motion
Time Step 0.01 s, 200 Points/Period
Exact Euler

11
Simple Harmonic Motion
Time Step 0.001 s, 2000 Points/Period
Exact Euler

12
Simple Harmonic Motion
Time Step 0.001 s, 2000 Points/Period
Exact Euler

13
Euler Method and Conservation of Energy
It appears that the Euler Method does not
conserve the total energy for oscillatory motions
over each complete period!
The total energy of our pendulum is
Lets make mgl a unit of energy and ? -1 a unit
of time

14
Conservation of Energy
Lets use the Euler Method
For our use of ? -1

Energy increases with time
15
Euler-Cromer Method
Euler Method
Euler-Cromer Method
Do I 1, Nstep
End Do

16
Simple Harmonic Motion
Time Step 0.02 s, 100 Points/Period
Exact Euler-Cromer

17
For Comparison Euler Methos
Time Step 0.01 s, 200 Points/Period
Exact Euler

18
Euler-Cromer Method
The local truncation error in the Euler-Cromer
Method is still of the order O(?t2).
The Euler-Cromer Method conserves the total
energy for oscillatory motions over each complete
period!
The total energy of our pendulum is
Lets make mgl a unit of energy and ? -1 a unit
of time

19
Conservation of Energy
Lets use the Euler-Cromer Method
For our use of ? -1

20
Conservation of Energy
Lets look at the term proportional to
We know

The change of the total energy over one complete
cycle is proportional to ?t3.
Write a Comment
User Comments (0)
About PowerShow.com