Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
One-step Methods
Numerical Solutions for ODEs
2
One-step Methods( ),dy f x y
dx=
New value = old value+ slope×step size
Solving ODEs of the form:
Numerical to solve
1i iy y hφ+ = +
Mathematical term
3
One-step Methods
4
Taylor Methods:Euler’s method
( ),i if x yφ =At xi
( )1 ,i i i iy y f x y h+ = +
5
Example25.1
6
Example25.1
7
Example25.1
8
Effect of step size on the global truncation error
9
Taylor Methods:Heun’s method
10
Heun’s method
11
Runge-Kutta Methods:Midpoint Method
( )1 1 2 1 2,i i i iy y f x y h+ + += +
( )1 1 2 1 2,i i iy f x y+ + +′ =
Slope at the midpoint
The midpoint method
A value of y at the midpoint of the interval
( )1 2 ,2i i i ihy y f x y+ = +
12
13
Examplett
dtdy 2sin423 +−=Problem statement
Initial value y(t=0)=1
Exact solution
32cos23 2 +−−= ttty
14