Title: Ordinary Differential Equations
1Ordinary Differential Equations
2Ordinary Differential Equations
x independent variable y dependent
variable First order ODE, dependent variable
function of one independent variable
Pendulum
Vibrating mass on spring
- ODEs can be used to model behavior
- Higher order ODEs can always be expressed as 1st
order
3Numerical Solution of ODE Initial Value Problems
- Basic Concepts
- Explicit - Implicit (iterative)
- One-step (self starting) - Multi-step (non
self-starting) - Order
- Stability
- Basic methods to know
- Euler (simplest explicit)
- Runge-Kutta 4 (most often used RK method)
- Heun
- Iterated Heun (simplest predictor-corrector)
4Solutions
y
- General solutions or level curves
x
e.g.
- Particular solution specified by initial value
So
5Solutions
e.g.
where
Not a closed form solution
gives
- What should we do when no suitable closed form
solution exists?
Answer form a numerical model of the ODE to give
approximate y values at a number of x points.
- Advantages of a numerical model
Can handle any ODE, quickly generate solutions
without extensive math, good for solving on
computers.
- Disadvantages of a numerical model
Stability (solution can be badly behaved thus,
inaccurate), accuracy (can be well-behaved but
inaccurate).
6Numerical Solutions
Use information from current position, not future
- General solution stepping from
to
is
know
dont know
?
Represent or approximate
7Eulers Method
to
so that
8Eulers Method
f(x,y)
y
x
polygon approx to y and constant approximation
to f(x,y)
x
- Reasonable model/approximation if y is smooth
and not - varying fast.
- A sequence of steps gives the solution at
discrete points.
9Eulers Method
Explicit One-step First Order Stability (depends
very much on f and the step size)
10(No Transcript)
11(No Transcript)
12(No Transcript)
13(No Transcript)
14(No Transcript)
15Heun (without iteration)
- Predictor - Corrector (but still explicit)
- One-step
- Second order
- Stability (depends on the step size, better than
Euler)
16Iterated Heun
Predictor - Corrector (implicit,
iterative) Needs a stopping criterion One-step Sec
ond order Stability is good
17Runge-Kutta 4(RK4)
Explicit One-step Fourth Order !!! Stability
depends somewhat on f and step size)
18Final comment
- Using smaller values of h and using Eulers or
Heuns methods probably gives better accuracy
than using RK4 with larger values of h