Ordinary Differential Equations - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

Ordinary Differential Equations

Description:

nth order ODE requires n conditions to specify the solution ... Estimate the truncation error by taking each step twice: one full step, two half steps ... – PowerPoint PPT presentation

Number of Views:5983
Avg rating:3.0/5.0
Slides: 56
Provided by: cseTt
Category:

less

Transcript and Presenter's Notes

Title: Ordinary Differential Equations


1
Ordinary Differential Equations
  • Jyun-Ming Chen

2
Contents
  • Review
  • Eulers method
  • 2nd order methods
  • Midpoint
  • Heuns
  • Runge-Kutta Method
  • Systems of ODE
  • Stability Issue

3
Review
  • DE (Differential Equation)
  • An equation specifying the relations among the
    rate change (derivatives) of variables
  • ODE (Ordinary DE) vs. PDE (Partial DE)
  • The number of independent variables involved

4
Review (cont)
  • Solution of DE vs. Solution of Equation
  • Solution of an equation
  • Geometrically,

5
Review (cont)
Need additional conditions to specify a solution
  • Solution of an differential equation
  • Geometrically

6
Review (cont)
  • Order of an ODE
  • The highest derivative in the equation
  • nth order ODE requires n conditions to specify
    the solution
  • IVP (initial value problem) All conditions
    specified at the same (initial) point
  • BVP (boundary value problem) otherwise

7
IVP VS. BVPRevisit Shooting Problem
8
IVP vs. BVP
Physical meaning
9
Review (cont)
  • Linearity
  • No product nor nonlinear functions of y and its
    derivatives
  • nth order linear ODE

10
Focus of This Chapter
  • Solve IVP of nth order ODE numerically
  • e.g.,

11
ODE (IVP)
  • First order ODE (canonical form)
  • Every nth order ODE can be converted to n first
    order ODEs in the following method

12
(No Transcript)
13
Example
14
End of Review
15
The Canonical Problem
This is Eulers method
16
Example
17
Example (cont)
18
Error Analysis(Geometric Interpretation)
Think in terms of Taylors expansion
If the true solution were a straight line,
then Euler is exact
19
Error Analysis(From Taylors Expansion)
Eulers
Eulers truncation error O(Dx2) per step
1st order method
20
Cumulative Error
y
x
Remark Dx? Error ? But computation time?
x 0
x T
Number of steps T/Dx Cumulative Err. (T/Dx) ?
O(Dx2) O(Dx)
21
Example (Eulers)
22
Methods to Improve Euler
  • Motivated by Geometric Interpretation

23
Midpoint Method
24
Example (Midpoint)
25
Heuns Method
26
Example (Heuns)
27
Remark
  • Comparison of Euler, Heun, midpoint
  • 1st order Euler
  • 2nd order Heun, midpoint
  • order
  • All are special cases of RK (Runge-Kutta) methods

28
RK Methods
29
RK Methods (cont)
30
Taylors Expansion
31
RK 1st Order
32
RK 2nd Order
33
RK 2nd Order (cont)
34
RK 4th Order
  • Mostly commonly used one
  • Higher order more evaluation, but less gain on
    accuracy

35
System of ODE
  • Convert higher order ODE to 1st order ODEs
  • All methods equally apply, in vector form

36
Example (Mass-Spring-Damper System)
  • Governing Equation
  • After setting the initial conditions x(0) and
    x(0), compute the position and velocity of the
    mass for any t gt 0

37
Example (cont)
38
Example (cont)
set Dt0.1
39
Stability Symptom
40
Stability (cont)
  • Example Problem

Conditionally stable
41
Discussion
  • Different algorithm different stability limit
  • Check Midpoint Method
  • Different problem different stability limit
  • use the previous problem as benchmark

42
Implicit Method (Backward Euler)
43
Example
  • Remark
  • Always stable (for this problem)
  • Truncation error the same as Euler (only improve
    the stability)

44
Linear System of ODE with Constant Coefficients
45
Semi-Implicit Euler
  • Not guaranteed to be stable, but usually is

46
(No Transcript)
47
(No Transcript)
48
Stiff Set of ODE
Use the change of variable
Get the following solution
49
(No Transcript)
50
Adaptive Stepsize
  • Solving ODE numerically tracing the integral
    curve y(x)
  • whats wrong with uniform step size
  • Uniformly small waste effort
  • Uniformly large might miss details

51
Step Doubling
  • Idea
  • Estimate the truncation error by taking each step
    twice one full step, two half steps
  • control the step size such that the estimated
    error is not too big.

1?(2h1)
2?(h1)
Desired h0
52
Ex RK 2nd Order
Overhead of f(x,y) evaluations 2?42 6
53
Example
54
Ex (Semi-implicit Euler)
55
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com