Mathematics Exam  >  Mathematics Notes  >  Mathematics for IIT JAM, GATE, CSIR NET, UGC NET  >  Numerical Solutions of ODEs using Runge-Kutta Method - CSIR-NET Mathematical Sciences

Numerical Solutions of ODEs using Runge-Kutta Method - CSIR-NET Mathematical Sciences | Mathematics for IIT JAM, GATE, CSIR NET, UGC NET PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


3. Runge-Kutta Method
3.1. Runge-KuttaMethod. ThereareseveralRunge-Kuttameth-
ods, but the fourth order Runge-Kutta method is most popular. Sup-
pose x
0
(t) = f(t;x); x(a) = x
0
: and h =
b¡a
n
is the step length, the
fourth order Runge-Kutta method is given below,
k
1
= hf(t
i
;x
i
)
k
2
= hf(t
i
+
1
2
h;x
i
+
1
2
k
1
)
k
3
= hf(t
i
+
1
2
h;x
i
+
1
2
k
2
)
k
4
= hf(t
i
+h;x
i
+k
3
)
x
i+1
= x
i
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
IngeneralRunge-KuttamethodgivesmoreaccurateresultthanEu-
ler’s method at the same step length. However, Runge-Kutta method
is more expensive to implement, that is, at each step, Runge-Kutta
method requires more computation than Euler’s method( four func-
tion evaluations compare one in Euler’s method).
Example 3.1.
Example3.2. Findapproximatetox(1)ifx
0
(t)=t
2
¡e
x
sin(t);x(0)=
1 with h=0:25:
Solution Here the interval is [0, 1], so a = 0;b = 1: Since
h =
b¡a
n
= 0:25 we have n = 4 and we need to compute x
1
;x
2
;x
3
;x
4
starting with x
0
=x(0)=1; t
0
=0
Page 2


3. Runge-Kutta Method
3.1. Runge-KuttaMethod. ThereareseveralRunge-Kuttameth-
ods, but the fourth order Runge-Kutta method is most popular. Sup-
pose x
0
(t) = f(t;x); x(a) = x
0
: and h =
b¡a
n
is the step length, the
fourth order Runge-Kutta method is given below,
k
1
= hf(t
i
;x
i
)
k
2
= hf(t
i
+
1
2
h;x
i
+
1
2
k
1
)
k
3
= hf(t
i
+
1
2
h;x
i
+
1
2
k
2
)
k
4
= hf(t
i
+h;x
i
+k
3
)
x
i+1
= x
i
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
IngeneralRunge-KuttamethodgivesmoreaccurateresultthanEu-
ler’s method at the same step length. However, Runge-Kutta method
is more expensive to implement, that is, at each step, Runge-Kutta
method requires more computation than Euler’s method( four func-
tion evaluations compare one in Euler’s method).
Example 3.1.
Example3.2. Findapproximatetox(1)ifx
0
(t)=t
2
¡e
x
sin(t);x(0)=
1 with h=0:25:
Solution Here the interval is [0, 1], so a = 0;b = 1: Since
h =
b¡a
n
= 0:25 we have n = 4 and we need to compute x
1
;x
2
;x
3
;x
4
starting with x
0
=x(0)=1; t
0
=0
x
1
:
k
1
= hf(t
0
;x
0
)=0:25¤f(0;1)=0
k
2
= hf(t
0
+
1
2
h;x
0
+
1
2
k
1
)=f(0:125;1)=¡0:373276
k
3
= hf(t
0
+
1
2
h;x
0
+
1
2
k
2
)
= 0:25f(0:125;1+0:5(¡0:373276))=¡0:373276
k
4
= hf(t
0
+h;x
0
+k
3
)=0:25f(0:25;1¡0:373276)=¡0:309854
x
1
= x
0
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
= 1+
1
6
(0+2¤(¡0:373276)+2¤(¡0:373276)¡0:309854)
= 0:923911
t
1
= t
0
+h=0+0:25=0:25
x
2
:
k
1
= hf(t
1
;x
1
)=0:25¤f(:25;0:923911)=¡0:560741
k
2
= hf(t
1
+
1
2
h;x
1
+
1
2
k
1
)
= f(0:125;0:923911+0:5(¡0:560741))=¡0:719601
k
3
= hf(t
1
+
1
2
h;x
1
+
1
2
k
2
)
= 0:25f(0:125;0:923911+0:5(¡0:719601))=¡0:702688
k
4
= hf(t
1
+h;x
1
+k
3
)
= 0:25f(0:5;0:923911¡0:702688)=¡0:763158
x
2
= x
1
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
= 0:923911+
1
6
(¡0:560741+2¤(¡0:719601)+2¤(¡0:702688)¡0:763158)
= 0:750224
t
2
= t
1
+h=0:25+0:25=0:5
x
3
:
k
1
= hf(t
2
;x
2
)=0:25¤f(:5;0:750224)=¡0:765171
k
2
= hf(t
2
+
1
2
h;x
2
+
1
2
k
1
)
= f(0:625;0:750224+0:5(¡0:765171))=¡0:735295
k
3
= hf(t
2
+
1
2
h;x
2
+
1
2
k
2
)
= 0:25f(0:625;0:750224+0:5(¡0:735295))=¡0:739508
k
4
= hf(t
2
+h;x
2
+k
3
)
= 0:25f(0:75;0:750224¡0:739508)=¡0:637224
x
3
= x
2
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
= 0:750224+
1
6
(¡0:765171+2¤(¡0:735295)+2¤(¡0:739508)¡0:637224)
= 0:568891
t
3
= t
2
+h=0:5+0:25=0:75
Page 3


3. Runge-Kutta Method
3.1. Runge-KuttaMethod. ThereareseveralRunge-Kuttameth-
ods, but the fourth order Runge-Kutta method is most popular. Sup-
pose x
0
(t) = f(t;x); x(a) = x
0
: and h =
b¡a
n
is the step length, the
fourth order Runge-Kutta method is given below,
k
1
= hf(t
i
;x
i
)
k
2
= hf(t
i
+
1
2
h;x
i
+
1
2
k
1
)
k
3
= hf(t
i
+
1
2
h;x
i
+
1
2
k
2
)
k
4
= hf(t
i
+h;x
i
+k
3
)
x
i+1
= x
i
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
IngeneralRunge-KuttamethodgivesmoreaccurateresultthanEu-
ler’s method at the same step length. However, Runge-Kutta method
is more expensive to implement, that is, at each step, Runge-Kutta
method requires more computation than Euler’s method( four func-
tion evaluations compare one in Euler’s method).
Example 3.1.
Example3.2. Findapproximatetox(1)ifx
0
(t)=t
2
¡e
x
sin(t);x(0)=
1 with h=0:25:
Solution Here the interval is [0, 1], so a = 0;b = 1: Since
h =
b¡a
n
= 0:25 we have n = 4 and we need to compute x
1
;x
2
;x
3
;x
4
starting with x
0
=x(0)=1; t
0
=0
x
1
:
k
1
= hf(t
0
;x
0
)=0:25¤f(0;1)=0
k
2
= hf(t
0
+
1
2
h;x
0
+
1
2
k
1
)=f(0:125;1)=¡0:373276
k
3
= hf(t
0
+
1
2
h;x
0
+
1
2
k
2
)
= 0:25f(0:125;1+0:5(¡0:373276))=¡0:373276
k
4
= hf(t
0
+h;x
0
+k
3
)=0:25f(0:25;1¡0:373276)=¡0:309854
x
1
= x
0
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
= 1+
1
6
(0+2¤(¡0:373276)+2¤(¡0:373276)¡0:309854)
= 0:923911
t
1
= t
0
+h=0+0:25=0:25
x
2
:
k
1
= hf(t
1
;x
1
)=0:25¤f(:25;0:923911)=¡0:560741
k
2
= hf(t
1
+
1
2
h;x
1
+
1
2
k
1
)
= f(0:125;0:923911+0:5(¡0:560741))=¡0:719601
k
3
= hf(t
1
+
1
2
h;x
1
+
1
2
k
2
)
= 0:25f(0:125;0:923911+0:5(¡0:719601))=¡0:702688
k
4
= hf(t
1
+h;x
1
+k
3
)
= 0:25f(0:5;0:923911¡0:702688)=¡0:763158
x
2
= x
1
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
= 0:923911+
1
6
(¡0:560741+2¤(¡0:719601)+2¤(¡0:702688)¡0:763158)
= 0:750224
t
2
= t
1
+h=0:25+0:25=0:5
x
3
:
k
1
= hf(t
2
;x
2
)=0:25¤f(:5;0:750224)=¡0:765171
k
2
= hf(t
2
+
1
2
h;x
2
+
1
2
k
1
)
= f(0:625;0:750224+0:5(¡0:765171))=¡0:735295
k
3
= hf(t
2
+
1
2
h;x
2
+
1
2
k
2
)
= 0:25f(0:625;0:750224+0:5(¡0:735295))=¡0:739508
k
4
= hf(t
2
+h;x
2
+k
3
)
= 0:25f(0:75;0:750224¡0:739508)=¡0:637224
x
3
= x
2
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
= 0:750224+
1
6
(¡0:765171+2¤(¡0:735295)+2¤(¡0:739508)¡0:637224)
= 0:568891
t
3
= t
2
+h=0:5+0:25=0:75
x
4
:
k
1
= hf(t
3
;x
3
)=0:25¤f(0:75;0:568891)=¡0:641483
k
2
= hf(t
3
+
1
2
h;x
3
+
1
2
k
1
)
= f(0:875;0:568891+0:5(¡0:641483))=¡0:485628
k
3
= hf(t
3
+
1
2
h;x
3
+
1
2
k
2
)
= 0:25f(0:875;0:568891+0:5(¡0:485628))=¡0:510243
k
4
= hf(t
3
+h;x
3
+k
3
)
= 0:25f(1;0:568891¡0:510243)=¡0:308297
x
4
= x
3
+
1
6
(k
1
+2k
2
+2k
3
+k
4
)
= 0:568891+
1
6
(¡0:641483+2¤(¡0:485628)+2¤(¡0:510243)¡0:308297)
= 0:446327
t
4
= t
3
+h=0:75+0:25=1:0
So the approximation to x(1) is x(1)¼x
4
=0:446327: a
Read More
556 videos|198 docs

FAQs on Numerical Solutions of ODEs using Runge-Kutta Method - CSIR-NET Mathematical Sciences - Mathematics for IIT JAM, GATE, CSIR NET, UGC NET

1. What is the Runge-Kutta method for solving ordinary differential equations (ODEs)?
Ans. The Runge-Kutta method is a numerical technique used to approximate the solutions of ordinary differential equations. It is an iterative method that involves calculating intermediate values to improve the accuracy of the approximation. The most common form of the Runge-Kutta method is the fourth-order Runge-Kutta method, also known as RK4.
2. How does the Runge-Kutta method work?
Ans. The Runge-Kutta method works by dividing the interval of the ODE into smaller subintervals and approximating the solution at each subinterval. It uses a weighted average of several function evaluations at different points within each subinterval to calculate the next approximation. In the case of RK4, four function evaluations are used to calculate the weighted average, resulting in a more accurate approximation compared to lower-order methods.
3. What are the advantages of using the Runge-Kutta method?
Ans. The Runge-Kutta method offers several advantages for solving ODEs numerically. Firstly, it is a versatile method that can handle a wide range of ODEs, including both first-order and higher-order equations. Secondly, it provides higher accuracy compared to simpler methods like Euler's method. Additionally, the Runge-Kutta method allows for adaptive step sizes, meaning that the number of function evaluations can be adjusted to balance accuracy and computational efficiency.
4. Are there any limitations or drawbacks of the Runge-Kutta method?
Ans. While the Runge-Kutta method is a powerful numerical technique, it does have some limitations. One limitation is that it requires the evaluation of the derivative function at multiple points within each subinterval, which can be computationally expensive for complex ODEs. Another limitation is that the accuracy of the method decreases as the step size increases, meaning that very small step sizes may be needed to achieve high accuracy. Additionally, the Runge-Kutta method may not perform well for stiff ODEs, where the solution changes rapidly over a small interval.
5. How can the Runge-Kutta method be applied in real-world problems?
Ans. The Runge-Kutta method is widely used in various fields to solve real-world problems modeled by ODEs. It is particularly useful in physics, engineering, and mathematical modeling. For example, it can be used to simulate the motion of celestial bodies, analyze the behavior of electrical circuits, predict the spread of diseases, or model the dynamics of chemical reactions. By providing numerical solutions to ODEs, the Runge-Kutta method enables researchers and engineers to gain insights into complex systems and make predictions about their behavior.
556 videos|198 docs
Download as PDF
Explore Courses for Mathematics exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

MCQs

,

Semester Notes

,

Summary

,

UGC NET

,

Exam

,

past year papers

,

Important questions

,

CSIR NET

,

ppt

,

Previous Year Questions with Solutions

,

shortcuts and tricks

,

UGC NET

,

Numerical Solutions of ODEs using Runge-Kutta Method - CSIR-NET Mathematical Sciences | Mathematics for IIT JAM

,

pdf

,

Objective type Questions

,

video lectures

,

Extra Questions

,

study material

,

UGC NET

,

CSIR NET

,

GATE

,

Viva Questions

,

Free

,

Sample Paper

,

GATE

,

Numerical Solutions of ODEs using Runge-Kutta Method - CSIR-NET Mathematical Sciences | Mathematics for IIT JAM

,

Numerical Solutions of ODEs using Runge-Kutta Method - CSIR-NET Mathematical Sciences | Mathematics for IIT JAM

,

practice quizzes

,

mock tests for examination

,

CSIR NET

,

GATE

;