0% found this document useful (0 votes)
345 views13 pages

Runge-Kutta 4 Method

The document discusses the Runge-Kutta 4th order method for solving ordinary differential equations numerically. It provides an example of using the method to model the cooling of a ball over time. The key steps of the Runge-Kutta method are outlined and the results are compared to the exact solution. Tables and graphs show how the accuracy improves as the step size is reduced, demonstrating the convergence of the numerical method.

Uploaded by

Farhan Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
345 views13 pages

Runge-Kutta 4 Method

The document discusses the Runge-Kutta 4th order method for solving ordinary differential equations numerically. It provides an example of using the method to model the cooling of a ball over time. The key steps of the Runge-Kutta method are outlined and the results are compared to the exact solution. Tables and graphs show how the accuracy improves as the step size is reduced, demonstrating the convergence of the numerical method.

Uploaded by

Farhan Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Runge-Kutta 4 Order Method

th

1
Runge-Kutta 4 Order Method th

Fo
r
Runge Kutta 4 th order method is given by

wher
e

2
How to write Ordinary
Differential Equation
How does one write a first order differential equation in the form of

Exampl
e

is
rewritten
as

In this
case

3
Example
A ball at 1200K is allowed to cool down in air at an ambient
temperature of 300K. Assuming heat is lost only due to
radiation, the differential equation for the temperature of the
ball is given by

Find the seconds using Runge-Kutta 4th order


temperature at method.
Assume a step second
size of s.

4
Solution
Step 1:

5
Solution Cont

is the approximate temperature at

6
Solution Cont
Step 2:

7
Solution Cont

θ2 is the approximate temperature at

8
Solution Cont

The exact solution of the ordinary differential equation is given by the


solution of a non-linear equation as

The solution to this nonlinear equation at t=480 seconds is

9
Comparison with exact results

Figure 1. Comparison of Runge-Kutta 4th order method with exact solution


10
Effect of step size
Table 1. Temperature at 480 seconds as a function of step size, h

Step size, h θ (480) Et |єt|%

480 −90.278 737.85 113.94


240 594.91 52.660 8.1319
120 646.16 1.4122 0.21807
60 647.54 0.033626 0.0051926
30 647.57 0.00086900 0.00013419
(exact
)
11
Effects of step size on Runge-
Kutta 4 Order Method
th

Figure 2. Effect of step size in Runge-Kutta 4th order method

12
Comparison of Euler and Runge-
Kutta Methods

Figure 3. Comparison of Runge-Kutta methods of 1st, 2nd, and 4th order.


13

You might also like