Docsity

5.4 Runge-Kutta Methods, Exams of Calculus

Partial preview of the text

Download 5.4 Runge-Kutta Methods and more Exams Calculus in PDF only on Docsity!

5.4 Runge-Kutta Methods

Motivation: Obtain high-order accuracy of Taylor method without

knowledge of derivatives of ๐‘“๐‘“(๐‘ก๐‘ก, ๐‘ฆ๐‘ฆ).

Theorem 5.13(Taylorโ€™s Theorem in Two Variables) Suppose

๐‘“๐‘“(๐‘ก๐‘ก, ๐‘ฆ๐‘ฆ) and partial derivative up to order ๐‘›๐‘› + 1 continuous on

๐ท๐ท = {(๐‘ก๐‘ก, ๐‘ฆ๐‘ฆ)|๐‘Ž๐‘Ž โ‰ค ๐‘ก๐‘ก โ‰ค ๐‘๐‘, ๐‘๐‘ โ‰ค ๐‘ฆ๐‘ฆ โ‰ค ๐‘‘๐‘‘}, let (๐‘ก๐‘ก

0

0

) โˆˆ ๐ท๐ท. For (๐‘ก๐‘ก, ๐‘ฆ๐‘ฆ) โˆˆ

๐ท๐ท, there is ๐œ‰๐œ‰ โˆˆ

[

0

]

and ๐œ‡๐œ‡ โˆˆ

[

0

]

with

๐‘›๐‘›

๐‘›๐‘›

Here

๐‘›๐‘›

0

0

0

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

0

0

0

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

0

0

+[

( ๐œ•๐œ•โˆ’๐œ•๐œ•

0

)

2

2

๐œ•๐œ•

2

๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

2

0

0

0

0

๐œ•๐œ•

2

๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•๐œ•๐œ•๐œ•๐œ•

0

0

( ๐œ•๐œ•โˆ’๐œ•๐œ•

0

)

2

2

๐œ•๐œ•

2

๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

2

0

0

)] +

1

๐‘›๐‘›!

0

๐‘›๐‘›โˆ’๐‘—๐‘—

0

๐‘—๐‘—

๐œ•๐œ•

๐‘›๐‘›

๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

๐‘›๐‘›โˆ’๐‘—๐‘—

๐œ•๐œ•๐œ•๐œ•

๐‘—๐‘—

0

0

๐‘›๐‘›

๐‘—๐‘—=

Derivation of Runge-Kutta method of order two

Determine ๐‘Ž๐‘Ž

1

1

1

such that

1

1

1

โ€ฒ

) with ๐‘‚๐‘‚

2

) error.

Notice ๐‘“๐‘“

โ€ฒ

๐‘‘๐‘‘๐œ•๐œ•(๐œ•๐œ•,๐œ•๐œ•(๐œ•๐œ•))

๐‘‘๐‘‘๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

โ€ฒ

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

๐œ•๐œ•๐œ•๐œ•

Define:

( 2

)

1.Expand ๐‘Ž๐‘Ž

1

1

1

in 1

st

degree Taylor polynomial:

1

1

1

1

1

1

1

1

1

1

1

1

2.Match coefficients of equation (1) and (2) gives

1

1

1

1

1

with unique solution

1

1

1

Midpoint Method (one of Runge-Kutta methods of order two)

Consider to solve the IVP

โ€ฒ

with step size โ„Ž =

๐‘๐‘โˆ’๐‘Ž๐‘Ž

๐‘๐‘

0

๐‘–๐‘–+

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

for each ๐‘–๐‘– = 0, 1, 2, โ‹ฏ , ๐‘๐‘ โˆ’ 1.

Remark: Local truncation error of Midpoint method is ๐‘‚๐‘‚

2

Two stage formula of Runge-Kutta method of order two :

0

1

๐‘–๐‘–

๐‘–๐‘–

2

๐‘–๐‘–

๐‘–๐‘–

1

๐‘–๐‘–+

๐‘–๐‘–

2

for each ๐‘–๐‘– = 0, 1, 2, โ‹ฏ , ๐‘๐‘ โˆ’ 1.

Example 2. Use the Midpoint method with ๐‘๐‘ = 10, โ„Ž = 0.2,

๐‘–๐‘–

= 0.2๐‘–๐‘– and ๐‘ค๐‘ค

0

= 0.5 to solve the IVP

โ€ฒ

2

Example. Use the Modified Euler method with ๐‘๐‘ = 10, โ„Ž = 0.2,

๐‘–๐‘–

= 0.2๐‘–๐‘– and ๐‘ค๐‘ค

0

= 0.5 to solve the IVP

โ€ฒ

2

Heunโ€™s Method (Runge-Kutta Method of order three)

Idea: Approximate ๐‘‡๐‘‡

( 3 )

) with ๐‘‚๐‘‚

3

) error by ๐‘“๐‘“

1

1

2

0

๐‘–๐‘–+

๐‘–๐‘–

[๐‘“๐‘“

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๐‘–๐‘–

๏ฟฝ)]

for each ๐‘–๐‘– = 0, 1, 2, โ‹ฏ , ๐‘๐‘ โˆ’ 1.

Runge-Kutta Method of order four

0

1

๐‘–๐‘–

๐‘–๐‘–

2

๐‘–๐‘–

๐‘–๐‘–

1

3

๐‘–๐‘–

๐‘–๐‘–

2

4

๐‘–๐‘–+

๐‘–๐‘–

3

๐‘–๐‘–+

๐‘–๐‘–

1

2

3

4

for each ๐‘–๐‘– = 0, 1, 2, โ‹ฏ , ๐‘๐‘ โˆ’ 1.

Example 3. Use the Runge-Kutta method of order 4 with ๐‘๐‘ =

๐‘–๐‘–

= 0.2๐‘–๐‘– and ๐‘ค๐‘ค

0

= 0.5 to solve the IVP

โ€ฒ

2