Docsity

Ordinary Differential Equations - Numerical Analysis | MATH 475A, Study notes of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Chapter 5. Ordinary Differential Equations — IVP
5.1 IVP
•to find y(t) such that
(y′(t) = f(t, y(t)), a ≤t≤b
y(a) = y0
•example: (y′=y−t2+ 1,0≤t≤2
y(0) = .5
•Suppose that f(t, y):
(1) continuous;
(2) (Lipschitz) there exists L > 0 such that
|f(t, y1)−f(t, y2)| ≤ L|y1−y2|
for all a≤t≤band −∞ < y1, y2<∞.
Then the IVP has a unique solution.
•quiver:
0
1
2
3
4
5
0 0.5 1 1.5 2
1
pf3
pf4
pf5

Partial preview of the text

Download Ordinary Differential Equations - Numerical Analysis | MATH 475A and more Study notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Chapter 5. Ordinary Differential Equations — IVP

5.1 IVP

  • to find y(t) such that

{

y

′ (t) = f (t, y(t)), a ≤ t ≤ b

y(a) = y 0

  • example: {

y

′ = y − t

2

  • 1, 0 ≤ t ≤ 2

y(0) =. 5

  • Suppose that f (t, y):

(1) continuous;

(2) (Lipschitz) there exists L > 0 such that

|f (t, y 1 ) − f (t, y 2 )| ≤ L|y 1 − y 2

for all a ≤ t ≤ b and −∞ < y 1 , y 2

Then the IVP has a unique solution.

  • quiver:

0

1

2

3

4

5

0 0.5 1 1.5 2

5.2 Euler’s Method

setting t i = a + ih, where i = 0, 1 ,... , N and step size h =

b − a

N

  • O(h)
  • explicit: by forward difference,

w i+ = w i

  • hf (t i , w i ), i = 0, 1 ,... , N − 1

with w 0 = y 0

  • implicit: by backward difference,

w i+ = w i

  • hf (t i+ , w i+ ), i = 0, 1 ,... , N − 1

with w 0 = y 0

  • example: {

y

′ = y − t

2

  • 1, 0 ≤ t ≤ 2

y(0) =. 5

with exact solution y = (t + 1)

2 −. 5 e

t

1

2

3

4

5

0 0.5 1 1.5 2

1

2

3

4

5

6

0 0.5 1 1.5 2

  • comparison of different step sizes

-0.

-0.

-0.

0

1

0 0.5 1 1.5 2 2.5 3

5.5 Runge-Kutta (RK) Methods

  • in general,

wi+1 = wi + h

s ∑

j=

γj Kj ,

where

K

j = f

(

t i

  • α j h, w i
  • h

s ∑

l=

β jl

K

l

)

  • ode23, ode45, ode
  • example: {

y

′ = −y − 5 e

−t sin 5t, 0 ≤ t ≤ 3

y(0) = 1

-0.

-0.

-0.

0

1

0 0.5 1 1.5 2 2.5 3

5.6 Systems of ODEs and Higher-Order ODEs

  • to solve (^) 

  

  

y

′

1

= f 1 (t, y 1 ,... , y m

y

′

m

= f m (t, y 1 ,... , y m

over a ≤ t ≤ b with initial conditions

y 1 (a) = α 1 ,... , ym(a) = αm

  • similar conclusion on existence and uniqueness
  • for higher-order y

(m) = f (t, y, y

′ ,... , y

(m−1) ) over a ≤ t ≤ b, with

y(a) = α 1 , y

′ (a) = α 2 ,... , y

(m−1) (a) = α m , set

y 1 = y, y 2 = y

′ ,... , y m = y

(m−1) ,

then 

    

    

y

′

1

= y 2

y

′

m− 1 = ym

y

′

m

= f (t, y 1 ,... , y m

  • example: y

′′

  • y = 6 cos t with y(0) = 2 and y

′ (0) = 3; exact answer:

y = 2 cos t + 3 sin t + 3t sin t

0

5

10

15

20

25

0 2 4 6 8 10