Académique Documents
Professionnel Documents
Culture Documents
......... ............. ......... ........... .... .... ......... ........... ........... ......... ............. ........... ........ ........ ......................... ....................... ........ ........ ........................ ..................
.... .............. .... .... .... .... .... ........... ............. ...... .... ............... ............................... ............. ..... ..... ..... ..... .... .... .... .... ................. ........................... .... ................................................................. ........... .... .... ............... .............................. ................... .... ............... .... .................. .... ................... .... ............ .... .... ............... .... .... .... ................ ........ ..... ............. .... .........
... .. .. ........ .. .. .. .. .. .... .... . .. .. .. .. .. .. .. .. .... ... ..... .. .. .. .. .. ........ .. ... .....
..................... .................... ........ ......... ...................... .......................... ................... .................... ........ ........ ...................... ....................... ......................... .................... .......................... ........ ........ .................... .......................... ....... ......... .................... ......................... ....... ......... .......................... .......................... ........ ........ ........ ............................. .....................
MATH 160
Lecture Notes
.......... .... .... ......... ....... .................... ........................ .... ..... .... .... ............. ............. ..... ....... ........... ..... ..... ... ..
..................... ... ................ ................ ......................... ... ......... ... ........ ........................ ................... ................ ...................... ................... .... ... ............ ............ .... .... ......... ........
... ............... ... ..... ..... ... ... ................ ....... ....... ... .......... ... ........................ ... ...............
Lecture Notes ... ................... .... .... .... ....
.. .......... .. ..........
...... ...... ..........
. .
...... ...... ........... .............
............ .. ......... .. .. .. .. ..... ...... ..... ...... ... . ..
... ........... ... .................. ... ..................... ............ ... .......... .... ................ ... ... ... ... ......................
..... ...... .......... ...... ...... ...... .....
.......... .. ...... .. .. .. ... .. .. .. ....... ..
. .. . .. .
..................... ...................... .................. ......................... ...... .......
.. ..........
..........
......... .... ... ... ................. ... .... .... ... ... ............. ... .................
......................... ................. .................. ....................... ................. .. ....... ... ..
..................
.. ............... .. .. .. ........ .. ................... .. ..........
............. ...... ...... ...... ............. .......... Page 1
1. Introduction
As usual, we are concerned with the numerical solution of the first order differential equa-
tion with initial condition.
dy
= f (x, y), y(x0) = y0
dx
In Eulers method, with a step-size of h, our formula is
y1 = y0 + hy 0
Since y 0 = f (x, y), the formula is equivalent to
y1 = y0 + hy 0
Recall the Taylor series
1 h2 y 00 + 1 h3 y 000 +
y = y0 + hy 0 + 2 3!
To improve Eulers method, we include one more term of the Taylor series. Thus,
y1 = y0 + hy 0 + 12 h2 y 00
This is the basis of Runge-Kutta second order method. Note that there is a no problem
with regards to y 0 because y 0 = f (x, y). Now consider y 00. From calculus, we have
00 d 0 d dy
y = y = f (x, y) = f (x, y) + f (x, y)
dx dx x y dx
.......... .... .... ......... ....... .................... ........................ .... ..... .... .... ............. ............. ..... ....... ........... ..... ..... ... ..
..................... ... ................ ................ ......................... ... ......... ... ........ ........................ ................... ................ ...................... ................... .... ... ............ ............ .... .... ......... ........
... ............... ... ..... ..... ... ... ................ ....... ....... ... .......... ... ........................ ... ...............
Lecture Notes ... ................... .... .... .... ....
.. .......... .. ..........
...... ...... ..........
. .
...... ...... ........... .............
............ .. ......... .. .. .. .. ..... ...... ..... ...... ... . ..
... ........... ... .................. ... ..................... ............ ... .......... .... ................ ... ... ... ... ......................
..... ...... .......... ...... ...... ...... .....
.......... .. ...... .. .. .. ... .. .. .. ....... ..
. .. . .. .
..................... ...................... .................. ......................... ...... .......
.. ..........
..........
......... .... ... ... ................. ... .... .... ... ... ............. ... .................
......................... ................. .................. ....................... ................. .. ....... ... ..
..................
.. ............... .. .. .. ........ .. ................... .. ..........
............. ...... ...... ...... ............. .......... Page 2
2. Heuns Method
From the preceding section, we have the following equations for Heuns method:
y1 = y0 + h (a1k1 + a2k2)
k1 = f (x0, y0)
k2 = f (x0 + p1h, y0 + q1k1h)
1
a2 =
2
1
a1 =
2
p1 = 1
q1 = 1
Therefore, we have the following formulas:
y1 = y0 + h ( 1
2 k 1 + 1 k ), where
2 2
k1 = f (x0, y0)
k2 = f (x0 + h, y0 + k1h)
Now, let us assume that we subdivide the interval [x0, x] into n equal subintervals. Then
h = x1x
n
0 . Let Let x , x , . . . , x
1 2 n1 be the interior points, and let xn = x. If yi denotes
.......... .... .... ......... ....... .................... ........................ .... ..... .... .... ............. ............. ..... ....... ........... ..... ..... ... ..
..................... ... ................ ................ ......................... ... ......... ... ........ ........................ ................... ................ ...................... ................... .... ... ............ ............ .... .... ......... ........
... ............... ... ..... ..... ... ... ................ ....... ....... ... .......... ... ........................ ... ...............
Lecture Notes ... ................... .... .... .... ....
.. .......... .. ..........
...... ...... ..........
. .
...... ...... ........... .............
............ .. ......... .. .. .. .. ..... ...... ..... ...... ... . ..
... ........... ... .................. ... ..................... ............ ... .......... .... ................ ... ... ... ... ......................
..... ...... .......... ...... ...... ...... .....
.......... .. ...... .. .. .. ... .. .. .. ....... ..
. .. . .. .
..................... ...................... .................. ......................... ...... .......
.. ..........
..........
......... .... ... ... ................. ... .... .... ... ... ............. ... .................
......................... ................. .................. ....................... ................. .. ....... ... ..
..................
.. ............... .. .. .. ........ .. ................... .. ..........
............. ...... ...... ...... ............. .......... Page 4
Exercise 1.
Use the Runge-Kutta second order Heuns method to solve the following:
dy
= y, and y(0) = 1
dx
Find y(0.1) using a step-size of h = 0.05.