2. Academic Description
Presenter Details:
Md. Sajjad Hossain
Id: 18010101
Md. Shoheal Hossan
Id: 18010125
Tasmia Kamal
Id: 18010126
5th semester ,31st batch, CSE
Course title: Numerical Analysis
Course Code: CSE 311
Course Teacher: Wahidul Alam
Sr. Lecturer, CSE, FSET, USTC.
University of Science and Technology Chittagong
Department of Computer Science and Engineering
2
3. Definition of Runge-Kutta methods:
In numerical analysis, the Runge-kutta methods are a family
of implicit and explicit interactive methods which include the
well-known routine called the Euler Method, used in temporal
discretization for the approximate solutions of ordinary
differential equation. These methods were developed around
1900 by the German mathematician Carl Runge and Wilhelm
Kutta.
3
4. The most widely known member of the Runge-Kutta
family is generally referred to as “RK4”, “Classic Runge-
Kutta method or simply as “the Runge-Kutta method.
5. Application:
The application of Runge-Kutta methods
as a means of solving non-linear partial
differential equations is demonstrated
with the help of a specific fluid flow
problem. The numerical results obtained
are compared with the analytical solution
and the solution obtained by implicit,
explicit and Crank-Nicholson finite
difference methods. The error analysis
and computational efficiency analysis are
performed to test each method.
5
6. Explanation of the Runge-Kutta Methods:
Let an initial value problem be specified as follows:
𝜕𝑦
𝜕𝑡
= f(t, y), y(to) = yo
Here, y is an unknown function (scalar or vector) of time t, which we
would like to approximate; we told that
𝜕𝑦
𝜕𝑡
, the rate at which y
changes, is a function from t and t0 to y itself. At the initial time is t0
and the corresponding y value is yo. The function f and the initial
conditions to, yo are given.
6
7. Now pick a step-size h>0 and define
yn+1 = yn +
1
6
(k1+2k2+2k3+k4);
tn+1= tn + h
for n=0, 1, 2, 3,…. Using
k1= hf(tn,yn)
k2= hf(tn+
ℎ
2
, yn+
k1
2
)
k3= hf(tn+
ℎ
2
, yn+
k2
2
)
k4= hf(tn+h, yn + k3)
8. Here, yn+1 is the RK4 approximation of y(tn+1), and
the next value (yn+1) is determined by the present
value (yn) plus the weighted average of four
increments, where each increment is the product of
the size of the interval h and an estimated slope
specified by function f on the right-hand side of the
differential equation
9. • k1 is the slope at the beginning of the interval using y (Euler’s
method);
• k2 is the slope at the midpoint of the interval using y and k1;
• k3 is again the slope at the midpoint, but now using y and k2;
• k4 is the slope at the end of the interval, using y and k3.
In averaging the four slopes , greater weight is given to the slopes
at the midpoint. If f is the independent of y, so that the differential
equation is equivalent to a simple integral.
11. Example:
Example 1: Using Runge-Kutta method Solve y’ = xy for x= 1.4. Initially x =
1, y=2 (take h= 0.2)
Solution: The given differential equation is,
𝜕𝑦
𝜕𝑡
= f(x, y)
= x y
Given that x0 = 1, y0 = 2, and h= 0.2
First interval: K1 = h f(x0, y0)
= 0.2 f(1,2)
= 0.2 (1 x 2)
= 0.4
11
15. Since, x2 = x1 + h
= 1.2 +.2
= 1.4
and, y2 = y1 +
1
6
(k1+2k2+2k3+k4)
= 2.4921429 +
1
6
( 0.5981143 +1.451424 + 1.4845994 + 0.9056439)
= 3.2321065
The value of x and y can be tabularized by:
x 1 1.2 1.4
y 2 2.4921429 3.2321065
16. Example:
Example 2: Use Runge-Kutta quadratic method to calculate three
additional points on thesolution curve of the problem
𝜕𝑦
𝜕𝑥
= 1-2xy, y(0)
= 0, h= 0.1
Solution: The given differential equation is,
𝜕𝑦
𝜕𝑥
= 1- 2xy; given initial condition y(0) = 0, x0 = 0 and h= 0.1
K1 = h f(x0, y0)
= 0.1f(0, 0)
= 0.1(1-2 x 0x0)
= 0.1
16