SlideShare a Scribd company logo
1 of 22
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
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
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.
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
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
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)
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
• 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.
Graphical Representation:
10
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
k2 = h f(x0 +
ℎ
2
, y0 +
k1
2
)
= 0.2 f(1.1 , 2.2)
= 0.2 (1.1 x 2.2)
= 0.484
k3 = h f(x0 +
ℎ
2
, y0 +
k2
2
)
= 0.2 f(1.1 , 2.242)
= 0.2 (1.1 x 2.242)
= 0.49324
k4 = h f(x0 + ℎ , y0 + k3)
= 0.2 f(1.1 , 2.49324)
= 0.2 (1.1 x 2.49324 )
= 0.5983776
x0 +
ℎ
2
= 1+
0.2
2
= 1.1
y0 +
k1
2
= 2+
0.4
2
= 2.2
y0 +
k2
2
= 2 +
0.484
2
= 2.242
x0 + h =1+ 0.2
= 1.2
y0 + k3= 2 + 0.49324
= 2.49324
Here, x1 = x0 + h
= 1+ 0.2
= 1.2
y1 = y0 +
1
6
(k1+2k2+2k3+k4)
= 2+
1
6
(0.4 + 2 x 0.484 +2 x 0.49324 + 0.5983776)
= 2+
1
6
(0.4 + 0.968+0.98648 + 0.5983776)
= 2.4921429
Second Interval,
k1 = h f(x1 , y1)
= 0.2 f(1.2, 2.4921429)
= 0.2 ( 1.2 x 2.4921429)
= 0.5981143
k2 = h f(x1 +
ℎ
2
, y1 +
k1
2
)
= 0.2 f(1.3 , 2.7911999)
= 0.2 (1.3 x 2.7911999)
= 0.725712
k3 = h f(x1 +
ℎ
2
, y1 +
k2
2
)
= 0.2 f(1.3 , 2.8549989)
= 0.2 (1.3 x 2.8549989)
= 0.7422997
k4 = h f(x1 + ℎ , y1 + k3)
= 0.2 f(1.1 , 3.2344426)
= 0.2 (1.1 x 3.2344426)
= 0.9056439
x1 +
ℎ
2
= 1.2+
0.2
2
= 1.3
y1 +
k1
2
= 2.4921429+
0.5981143
2
= 2.7911999
y1 +
k2
2
= 2.4921429 +
0.725712
2
= 2.8549989
x1 + h =1.2+ 0.2
= 1.4
y1 + k3= 2.4921429 + 0.7422997
= 3.2344426
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
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
k2 = h f(x0 +
ℎ
2
, y0 +
k1
2
)
= 0.1f(0+
0.1
2
, 0+
0.1
2
)
= 0.1 f(0.05 , 0.05)
= 0.1 (1- 2 x0.05 x0.05)
= 0.0995
k3 = h f(x0 +
ℎ
2
, y0 +
k2
2
)
= 0.1f(0.05, 0+
0.0995
2
)
= 0.1 f(0.5 , 0.04975)
= 0.1 (1- 2 x0.05 x 0.04975)
= 0.0995025
k4 = h f(x0 + ℎ , y0 + k3)
= 0.1 f(0.1 , 0.0995025)
= 0.2 (1-2x 0.1 x 0.0995025)
= 0.09801
X1 = x0 + h
= 0 + 0.1
= 0.1
Since, y1 = y0 +
1
6
(k1+2k2+2k3+k4)
= 0 +
1
6
( 0.1 +2x 0.0995 + 2 x 0.0995025 + 0.09801)
=
1
6
( 0.1 + 0.199 + 0.199005 + 0.09801)
= 0.0993358
= 0.099336
The value of x and y can be tabularized by:
x 0 0.1
y 0 0.99336
Algorithm (Runge-Kutta) Method of order 4
20
References:
▫ Text book: Numerical Analysis by A.R. Vasishtha and Vipin Vasishtha
▫ https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods
▫ https://www.quora.com/What-are-the-applications-of-the-Runge-
Kutta-method-in-real-life-based
21
Ask frequently, if you have any
QUESTION???

More Related Content

What's hot

Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficientSanjay Singh
 
Partial differential equations
Partial differential equationsPartial differential equations
Partial differential equationsaman1894
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference methodPrateek Jha
 
Partial differentiation B tech
Partial differentiation B techPartial differentiation B tech
Partial differentiation B techRaj verma
 
MILNE'S PREDICTOR CORRECTOR METHOD
MILNE'S PREDICTOR CORRECTOR METHODMILNE'S PREDICTOR CORRECTOR METHOD
MILNE'S PREDICTOR CORRECTOR METHODKavin Raval
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve Mukuldev Khunte
 
Finite difference method
Finite difference methodFinite difference method
Finite difference methodDivyansh Verma
 
Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference InterpolationVARUN KUMAR
 
Laplace transform
Laplace  transform   Laplace  transform
Laplace transform 001Abhishek1
 
First order linear differential equation
First order linear differential equationFirst order linear differential equation
First order linear differential equationNofal Umair
 
Newton's forward & backward interpolation
Newton's forward & backward interpolationNewton's forward & backward interpolation
Newton's forward & backward interpolationHarshad Koshti
 
Fourier Series - Engineering Mathematics
Fourier Series -  Engineering MathematicsFourier Series -  Engineering Mathematics
Fourier Series - Engineering MathematicsMd Sadequl Islam
 
Laplace Transform and its applications
Laplace Transform and its applicationsLaplace Transform and its applications
Laplace Transform and its applicationsDeepRaval7
 
Cauchy integral theorem & formula (complex variable & numerical method )
Cauchy integral theorem & formula (complex variable & numerical method )Cauchy integral theorem & formula (complex variable & numerical method )
Cauchy integral theorem & formula (complex variable & numerical method )Digvijaysinh Gohil
 

What's hot (20)

Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficient
 
Partial differential equations
Partial differential equationsPartial differential equations
Partial differential equations
 
A brief introduction to finite difference method
A brief introduction to finite difference methodA brief introduction to finite difference method
A brief introduction to finite difference method
 
Partial differentiation B tech
Partial differentiation B techPartial differentiation B tech
Partial differentiation B tech
 
Laplace transform
Laplace transformLaplace transform
Laplace transform
 
MILNE'S PREDICTOR CORRECTOR METHOD
MILNE'S PREDICTOR CORRECTOR METHODMILNE'S PREDICTOR CORRECTOR METHOD
MILNE'S PREDICTOR CORRECTOR METHOD
 
presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve presentation on Euler and Modified Euler method ,and Fitting of curve
presentation on Euler and Modified Euler method ,and Fitting of curve
 
Taylor series
Taylor seriesTaylor series
Taylor series
 
Finite difference method
Finite difference methodFinite difference method
Finite difference method
 
Runge-Kutta-Methods.pptx
Runge-Kutta-Methods.pptxRunge-Kutta-Methods.pptx
Runge-Kutta-Methods.pptx
 
Newton's Forward/Backward Difference Interpolation
Newton's Forward/Backward  Difference InterpolationNewton's Forward/Backward  Difference Interpolation
Newton's Forward/Backward Difference Interpolation
 
Power series
Power series Power series
Power series
 
Laplace transform
Laplace  transform   Laplace  transform
Laplace transform
 
First order linear differential equation
First order linear differential equationFirst order linear differential equation
First order linear differential equation
 
Newton's forward & backward interpolation
Newton's forward & backward interpolationNewton's forward & backward interpolation
Newton's forward & backward interpolation
 
The wave equation
The wave equationThe wave equation
The wave equation
 
Numerical analysis ppt
Numerical analysis pptNumerical analysis ppt
Numerical analysis ppt
 
Fourier Series - Engineering Mathematics
Fourier Series -  Engineering MathematicsFourier Series -  Engineering Mathematics
Fourier Series - Engineering Mathematics
 
Laplace Transform and its applications
Laplace Transform and its applicationsLaplace Transform and its applications
Laplace Transform and its applications
 
Cauchy integral theorem & formula (complex variable & numerical method )
Cauchy integral theorem & formula (complex variable & numerical method )Cauchy integral theorem & formula (complex variable & numerical method )
Cauchy integral theorem & formula (complex variable & numerical method )
 

Similar to Runge-Kutta methods with examples

PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES   PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES Mazharul Islam
 
Numerical Methods.pptx
Numerical Methods.pptxNumerical Methods.pptx
Numerical Methods.pptxRehmanRasheed3
 
Assignment For Matlab Report Subject Calculus 2
Assignment For Matlab Report Subject  Calculus 2Assignment For Matlab Report Subject  Calculus 2
Assignment For Matlab Report Subject Calculus 2Laurie Smith
 
L5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeL5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeSam Alalimi
 
Introduction to Differential Equations
Introduction to Differential EquationsIntroduction to Differential Equations
Introduction to Differential EquationsVishvaraj Chauhan
 
48 circle part 1 of 2
48 circle part 1 of 248 circle part 1 of 2
48 circle part 1 of 2tutulk
 
Solutions_Chapter3.pdf
Solutions_Chapter3.pdfSolutions_Chapter3.pdf
Solutions_Chapter3.pdfTessydee
 
Computational techniques
Computational techniquesComputational techniques
Computational techniquesRafi Dar
 
Rosser's theorem
Rosser's theoremRosser's theorem
Rosser's theoremWathna
 
Convexity in the Theory of the Gamma Function.pdf
Convexity in the Theory of the Gamma Function.pdfConvexity in the Theory of the Gamma Function.pdf
Convexity in the Theory of the Gamma Function.pdfPeterEsnayderBarranz
 
Ph 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICSPh 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICSChandan Singh
 
Clarke fourier theory(62s)
Clarke   fourier theory(62s)Clarke   fourier theory(62s)
Clarke fourier theory(62s)apsitachi
 

Similar to Runge-Kutta methods with examples (20)

Ma2002 1.7 rm
Ma2002 1.7 rmMa2002 1.7 rm
Ma2002 1.7 rm
 
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES   PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
PRESENTATION ON INTRODUCTION TO SEVERAL VARIABLES AND PARTIAL DERIVATIVES
 
Ma2002 1.9 rm
Ma2002 1.9 rmMa2002 1.9 rm
Ma2002 1.9 rm
 
Ma2002 1.10 rm
Ma2002 1.10 rmMa2002 1.10 rm
Ma2002 1.10 rm
 
Numerical Methods.pptx
Numerical Methods.pptxNumerical Methods.pptx
Numerical Methods.pptx
 
Assignment For Matlab Report Subject Calculus 2
Assignment For Matlab Report Subject  Calculus 2Assignment For Matlab Report Subject  Calculus 2
Assignment For Matlab Report Subject Calculus 2
 
L5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shapeL5 determination of natural frequency & mode shape
L5 determination of natural frequency & mode shape
 
Introduction to Differential Equations
Introduction to Differential EquationsIntroduction to Differential Equations
Introduction to Differential Equations
 
Unit vi
Unit viUnit vi
Unit vi
 
48 circle part 1 of 2
48 circle part 1 of 248 circle part 1 of 2
48 circle part 1 of 2
 
Solutions_Chapter3.pdf
Solutions_Chapter3.pdfSolutions_Chapter3.pdf
Solutions_Chapter3.pdf
 
Computational techniques
Computational techniquesComputational techniques
Computational techniques
 
Rosser's theorem
Rosser's theoremRosser's theorem
Rosser's theorem
 
Maths digital text
Maths digital textMaths digital text
Maths digital text
 
M220w07
M220w07M220w07
M220w07
 
Convexity in the Theory of the Gamma Function.pdf
Convexity in the Theory of the Gamma Function.pdfConvexity in the Theory of the Gamma Function.pdf
Convexity in the Theory of the Gamma Function.pdf
 
05_AJMS_332_21.pdf
05_AJMS_332_21.pdf05_AJMS_332_21.pdf
05_AJMS_332_21.pdf
 
Ph 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICSPh 101-9 QUANTUM MACHANICS
Ph 101-9 QUANTUM MACHANICS
 
Clarke fourier theory(62s)
Clarke   fourier theory(62s)Clarke   fourier theory(62s)
Clarke fourier theory(62s)
 
Chapter 5 assignment
Chapter 5 assignmentChapter 5 assignment
Chapter 5 assignment
 

Recently uploaded

Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 

Recently uploaded (20)

Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 

Runge-Kutta methods with examples

  • 1.
  • 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
  • 12. k2 = h f(x0 + ℎ 2 , y0 + k1 2 ) = 0.2 f(1.1 , 2.2) = 0.2 (1.1 x 2.2) = 0.484 k3 = h f(x0 + ℎ 2 , y0 + k2 2 ) = 0.2 f(1.1 , 2.242) = 0.2 (1.1 x 2.242) = 0.49324 k4 = h f(x0 + ℎ , y0 + k3) = 0.2 f(1.1 , 2.49324) = 0.2 (1.1 x 2.49324 ) = 0.5983776 x0 + ℎ 2 = 1+ 0.2 2 = 1.1 y0 + k1 2 = 2+ 0.4 2 = 2.2 y0 + k2 2 = 2 + 0.484 2 = 2.242 x0 + h =1+ 0.2 = 1.2 y0 + k3= 2 + 0.49324 = 2.49324
  • 13. Here, x1 = x0 + h = 1+ 0.2 = 1.2 y1 = y0 + 1 6 (k1+2k2+2k3+k4) = 2+ 1 6 (0.4 + 2 x 0.484 +2 x 0.49324 + 0.5983776) = 2+ 1 6 (0.4 + 0.968+0.98648 + 0.5983776) = 2.4921429 Second Interval, k1 = h f(x1 , y1) = 0.2 f(1.2, 2.4921429) = 0.2 ( 1.2 x 2.4921429) = 0.5981143
  • 14. k2 = h f(x1 + ℎ 2 , y1 + k1 2 ) = 0.2 f(1.3 , 2.7911999) = 0.2 (1.3 x 2.7911999) = 0.725712 k3 = h f(x1 + ℎ 2 , y1 + k2 2 ) = 0.2 f(1.3 , 2.8549989) = 0.2 (1.3 x 2.8549989) = 0.7422997 k4 = h f(x1 + ℎ , y1 + k3) = 0.2 f(1.1 , 3.2344426) = 0.2 (1.1 x 3.2344426) = 0.9056439 x1 + ℎ 2 = 1.2+ 0.2 2 = 1.3 y1 + k1 2 = 2.4921429+ 0.5981143 2 = 2.7911999 y1 + k2 2 = 2.4921429 + 0.725712 2 = 2.8549989 x1 + h =1.2+ 0.2 = 1.4 y1 + k3= 2.4921429 + 0.7422997 = 3.2344426
  • 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
  • 17. k2 = h f(x0 + ℎ 2 , y0 + k1 2 ) = 0.1f(0+ 0.1 2 , 0+ 0.1 2 ) = 0.1 f(0.05 , 0.05) = 0.1 (1- 2 x0.05 x0.05) = 0.0995 k3 = h f(x0 + ℎ 2 , y0 + k2 2 ) = 0.1f(0.05, 0+ 0.0995 2 ) = 0.1 f(0.5 , 0.04975) = 0.1 (1- 2 x0.05 x 0.04975) = 0.0995025
  • 18. k4 = h f(x0 + ℎ , y0 + k3) = 0.1 f(0.1 , 0.0995025) = 0.2 (1-2x 0.1 x 0.0995025) = 0.09801 X1 = x0 + h = 0 + 0.1 = 0.1 Since, y1 = y0 + 1 6 (k1+2k2+2k3+k4) = 0 + 1 6 ( 0.1 +2x 0.0995 + 2 x 0.0995025 + 0.09801) = 1 6 ( 0.1 + 0.199 + 0.199005 + 0.09801) = 0.0993358 = 0.099336
  • 19. The value of x and y can be tabularized by: x 0 0.1 y 0 0.99336
  • 21. References: ▫ Text book: Numerical Analysis by A.R. Vasishtha and Vipin Vasishtha ▫ https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods ▫ https://www.quora.com/What-are-the-applications-of-the-Runge- Kutta-method-in-real-life-based 21
  • 22. Ask frequently, if you have any QUESTION???