SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Computational
Techniques
   Presentation
   By Rafi Dar
   student of
   University of Kashmir
Computational Techniques

 Runge Kutta 2nd order Methods
 Runge Kutta 4th order Methods

 Eular Method

 Modified Eular Method
Runge Kutta Method

   Runge Kutta is the Family of Methods.
   for the approximation of solutions of ordinary
    differential equations.
   2nd order and 4th order methods are widely
    applied.
Steps:
1. First slope at some of the intermediate points is
    computed.
2. Weighted average of the slope is used to
    extrapolate the next solution point.
Runge Kutta 2nd order method:
 the interval [x1 , xf] is divided into subintervals
 and a weighted average of derivatives (slopes)
 at these intervals is used to determine the value
 of next dependent variable.
Advantage: of using Runge kutta method is that it
 is one step method.
   Consider following differential equation
    dy/dx = f(x,y).
    With an initial condition; y =y1, x= x1.

   At starting point compute slope of the
    curve as f(x1, y1) call it s1.
   Now compute slope of curve at point
    (x2, y1+S1h) as f(x2, y1+ s1h) Call it s2.
   Find the average of these slopes and then
    compute value of dependent variable y from
    the following equation.
     y2 = y1 + Sh ;
    where S = (s1 + s2 ) / 2.
    S1 = f(x1, y2) and s2 = f(x2, y1+ s1h).
   Hence starting from first point we can
    find second and then third and so on.
   In general the value of y for (i+1)th
    point on the solution curve is obtained
    from the ith solution point using formula:
            yi+1 = yi + hS
    Where S = (si + si+1 ) /2 and
          Si = f(xi,yi)
         si+1 = f(xi+h, yi+hsi)
    This formula for Runge Kutta 2nd Order is
    called as Heun’s method.
Runge Kutta 4th Order Method
   Error in 2nd order method is O(h³) per step.
   If more precision is required we use 4th order
    R.K method. In which error is O(h5) per step.
   In R.K 4th Order method, the slope at 4 points
    including the starting point is computed, and
    the average weight of these slopes is computed
    as :
               S =1/6(s1 + 2s2+ 2s3 +s4)
    where      s1 = f(x1 ,y1)
               s2 = f(x1+h/2, y1 +h/2 s1)
               s3 = f(x1+h/2, y1+h/2 s2)
               s4 = f(x1+h ,y1+h s3)
   the value of dependent variable y is computed as :
          y2 = y1 + hS
    In the similar manner, starting from second solution
    point we can compute the third point. The process is
    repeated till we find the solution in the desired interval.
    In general, the (i+1)th point of the solution curve is
    obtained from the ith point using the following equation:
    yi+1 =yi+ hs
          Where S = (s1 + 2s2 + 2s3 + s4) /6 and
          s1 = f(xi,yi)
          s2 = f(xi+ h/2, yi+ h/2 s1)
          s3 = f(xi+ h/2, yi+h/2 s2)
          s4 = f(xi+ h, yi+ hs3)
Euler Method
   The Euler method can be described as piecewise
    linear approximation technique to arrive at the
    solution.
    In Euler method we are given two starting values
    (x1,y2) and slope of the curve.
   Consider an ordinary different equation dy/dx =
    f(x,y).
    Replacing x, y by initial value x1,y1.
    dy/dx = f(x1,y1) or y1(x1) = f(x1,y1)
   Recall the mean value theorem:
    If a function is continuous and differentiable
    between two points (x1,y1) and (x2,y2). Then the
    slope of the line joining the points is derivative
    at least at one point call it (c, d) of the
    function.
        y1(c) = y(x2) –y(x1) / (x2 –x1)
Replacing x2 –x1 by h and c by x1.
We get :
      y1(x1)      = y(x2) –y(x1) / (x2 –x1) or
      f(x1,y1) = y(x2) –y(x1) / h
      y(x2)        = h f(x1,y1) + y(x1)
           y2      = y1+h f(x1,y1)
  Using this equation we can compute the
  second point on the solution curve as
  (x2,y2).
  Similarly taking (x2,y2) as starting point
  we can determine : y3         = y2 + h f(x2,y2)
  In general the (i+1)th point of the
  solution curve is obtained from ith point
  using following formula:
             yi+1    = yi + h f(xi, yi)
Modified Eular Method
 The modified Eular method is a multi step method,
 which utilizes information from more than one
 previous step to extrapolate solution curve.
 the method works correctly only in case of linear
 function. Alternatively we can calculate the average
 slope within the interval.
 Suppose we use interval bound by x =xi and x = xi+1
 Average slope =(y1(xi) + y1(xi+1) )/2.
 Then according to the basic Eular formula:
 Yi+1 = yi + h/2[y1(xi) + y(xi+1)]
 Yi+1 = yi + h/2[f(xi,yi) +f(xi+1,yi+1)]
 This is an improved estimate fo yi+1 at xi+1. but we can’t
 use it directly since yi+1 is unknown.
The value of yi+1 is predicted using
     basic Eular equation as:
     ypi+1      = yi + h f(xi, yi)
     This is called as predictor formula.
     Using this predicted value, a more
     accurate value is computed by equation
     called as corrector formula as follows:
     yci+1 = yi + h/2[f(xi,yi ) + f (xi+1,ypi+1)].
     In general we may conclude Eular method
     is a two step method:
1.   Predict yi+1solution point by using
     predictor formula.
2.   Correct the yi+1solution point using
     corrector formula.
Thank you.
reach out to me :
rafi.rey@gmail.com
or
https://www.facebook.com/rafi.dar.98

Weitere ähnliche Inhalte

Was ist angesagt?

Vector calculus
Vector calculusVector calculus
Vector calculusraghu ram
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficientSanjay Singh
 
Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl VishalVishwakarma59
 
All Differentiation
All  DifferentiationAll  Differentiation
All Differentiationmrmcdowall
 
Runge Kutta Method
Runge Kutta Method Runge Kutta Method
Runge Kutta Method Bhavik Vashi
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12Yasser Ahmed
 
Series solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular pointSeries solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular pointvaibhav tailor
 
Complex Variables and Numerical Methods
Complex Variables and Numerical MethodsComplex Variables and Numerical Methods
Complex Variables and Numerical MethodsDhrumit Patel
 
partialderivatives
partialderivativespartialderivatives
partialderivativesyash patel
 
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IV
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IVEngineering Mathematics-IV_B.Tech_Semester-IV_Unit-IV
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IVRai University
 
Exact & non differential equation
Exact & non differential equationExact & non differential equation
Exact & non differential equationSiddhi Shrivas
 
Grade 12 math differentiation-parametric functions
Grade 12 math  differentiation-parametric functionsGrade 12 math  differentiation-parametric functions
Grade 12 math differentiation-parametric functionssumanmathews
 
Partial differentiation B tech
Partial differentiation B techPartial differentiation B tech
Partial differentiation B techRaj verma
 
Linear differential equation
Linear differential equationLinear differential equation
Linear differential equationPratik Sudra
 
CHAIN RULE AND IMPLICIT FUNCTION
CHAIN RULE AND IMPLICIT FUNCTIONCHAIN RULE AND IMPLICIT FUNCTION
CHAIN RULE AND IMPLICIT FUNCTIONNikhil Pandit
 
APPLICATION OF PARTIAL DIFFERENTIATION
APPLICATION OF PARTIAL DIFFERENTIATIONAPPLICATION OF PARTIAL DIFFERENTIATION
APPLICATION OF PARTIAL DIFFERENTIATIONDhrupal Patel
 

Was ist angesagt? (20)

Vector calculus
Vector calculusVector calculus
Vector calculus
 
Differentiation
DifferentiationDifferentiation
Differentiation
 
Linear differential equation with constant coefficient
Linear differential equation with constant coefficientLinear differential equation with constant coefficient
Linear differential equation with constant coefficient
 
Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl Gradient , Directional Derivative , Divergence , Curl
Gradient , Directional Derivative , Divergence , Curl
 
All Differentiation
All  DifferentiationAll  Differentiation
All Differentiation
 
Runge Kutta Method
Runge Kutta Method Runge Kutta Method
Runge Kutta Method
 
Applied numerical methods lec12
Applied numerical methods lec12Applied numerical methods lec12
Applied numerical methods lec12
 
Conformal mapping
Conformal mappingConformal mapping
Conformal mapping
 
Series solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular pointSeries solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular point
 
Complex Variables and Numerical Methods
Complex Variables and Numerical MethodsComplex Variables and Numerical Methods
Complex Variables and Numerical Methods
 
partialderivatives
partialderivativespartialderivatives
partialderivatives
 
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IV
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IVEngineering Mathematics-IV_B.Tech_Semester-IV_Unit-IV
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-IV
 
Exact & non differential equation
Exact & non differential equationExact & non differential equation
Exact & non differential equation
 
Grade 12 math differentiation-parametric functions
Grade 12 math  differentiation-parametric functionsGrade 12 math  differentiation-parametric functions
Grade 12 math differentiation-parametric functions
 
Partial differentiation B tech
Partial differentiation B techPartial differentiation B tech
Partial differentiation B tech
 
Linear differential equation
Linear differential equationLinear differential equation
Linear differential equation
 
First order ordinary differential equations and applications
First order ordinary differential equations and applicationsFirst order ordinary differential equations and applications
First order ordinary differential equations and applications
 
CHAIN RULE AND IMPLICIT FUNCTION
CHAIN RULE AND IMPLICIT FUNCTIONCHAIN RULE AND IMPLICIT FUNCTION
CHAIN RULE AND IMPLICIT FUNCTION
 
APPLICATION OF PARTIAL DIFFERENTIATION
APPLICATION OF PARTIAL DIFFERENTIATIONAPPLICATION OF PARTIAL DIFFERENTIATION
APPLICATION OF PARTIAL DIFFERENTIATION
 
Jacobians new
Jacobians newJacobians new
Jacobians new
 

Ähnlich wie Computational techniques

Ähnlich wie Computational techniques (20)

Maths digital text
Maths digital textMaths digital text
Maths digital text
 
Cs jog
Cs jogCs jog
Cs jog
 
Numerical Method for UOG mech stu prd by Abdrehman Ahmed
Numerical Method for UOG mech stu prd by Abdrehman Ahmed Numerical Method for UOG mech stu prd by Abdrehman Ahmed
Numerical Method for UOG mech stu prd by Abdrehman Ahmed
 
AEM Integrating factor to orthogonal trajactories
AEM Integrating factor to orthogonal trajactoriesAEM Integrating factor to orthogonal trajactories
AEM Integrating factor to orthogonal trajactories
 
Sol75
Sol75Sol75
Sol75
 
Sol75
Sol75Sol75
Sol75
 
Runge-Kutta methods with examples
Runge-Kutta methods with examplesRunge-Kutta methods with examples
Runge-Kutta methods with examples
 
Solution 3
Solution 3Solution 3
Solution 3
 
Calc 6.1a
Calc 6.1aCalc 6.1a
Calc 6.1a
 
Solution 3
Solution 3Solution 3
Solution 3
 
Ellipses drawing algo.
Ellipses drawing algo.Ellipses drawing algo.
Ellipses drawing algo.
 
Analytic function
Analytic functionAnalytic function
Analytic function
 
(6) Hyperbola (Theory).Module-3pdf
(6) Hyperbola (Theory).Module-3pdf(6) Hyperbola (Theory).Module-3pdf
(6) Hyperbola (Theory).Module-3pdf
 
Equation of second degree
Equation of second degreeEquation of second degree
Equation of second degree
 
Derivatie class 12
Derivatie class 12Derivatie class 12
Derivatie class 12
 
Solution set 3
Solution set 3Solution set 3
Solution set 3
 
Lecture4
Lecture4Lecture4
Lecture4
 
Developing Expert Voices
Developing Expert VoicesDeveloping Expert Voices
Developing Expert Voices
 
Equation of second degree
Equation of second degreeEquation of second degree
Equation of second degree
 
Lecture_Slides_Mathematics_06_Optimization.pdf
Lecture_Slides_Mathematics_06_Optimization.pdfLecture_Slides_Mathematics_06_Optimization.pdf
Lecture_Slides_Mathematics_06_Optimization.pdf
 

Kürzlich hochgeladen

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 

Kürzlich hochgeladen (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

Computational techniques

  • 1. Computational Techniques Presentation By Rafi Dar student of University of Kashmir
  • 2. Computational Techniques  Runge Kutta 2nd order Methods  Runge Kutta 4th order Methods  Eular Method  Modified Eular Method
  • 3. Runge Kutta Method  Runge Kutta is the Family of Methods.  for the approximation of solutions of ordinary differential equations.  2nd order and 4th order methods are widely applied. Steps: 1. First slope at some of the intermediate points is computed. 2. Weighted average of the slope is used to extrapolate the next solution point.
  • 4. Runge Kutta 2nd order method: the interval [x1 , xf] is divided into subintervals and a weighted average of derivatives (slopes) at these intervals is used to determine the value of next dependent variable. Advantage: of using Runge kutta method is that it is one step method.
  • 5. Consider following differential equation dy/dx = f(x,y). With an initial condition; y =y1, x= x1.  At starting point compute slope of the curve as f(x1, y1) call it s1.  Now compute slope of curve at point (x2, y1+S1h) as f(x2, y1+ s1h) Call it s2.  Find the average of these slopes and then compute value of dependent variable y from the following equation. y2 = y1 + Sh ; where S = (s1 + s2 ) / 2. S1 = f(x1, y2) and s2 = f(x2, y1+ s1h).
  • 6. Hence starting from first point we can find second and then third and so on.  In general the value of y for (i+1)th point on the solution curve is obtained from the ith solution point using formula: yi+1 = yi + hS Where S = (si + si+1 ) /2 and Si = f(xi,yi) si+1 = f(xi+h, yi+hsi) This formula for Runge Kutta 2nd Order is called as Heun’s method.
  • 7. Runge Kutta 4th Order Method  Error in 2nd order method is O(h³) per step.  If more precision is required we use 4th order R.K method. In which error is O(h5) per step.  In R.K 4th Order method, the slope at 4 points including the starting point is computed, and the average weight of these slopes is computed as : S =1/6(s1 + 2s2+ 2s3 +s4) where s1 = f(x1 ,y1) s2 = f(x1+h/2, y1 +h/2 s1) s3 = f(x1+h/2, y1+h/2 s2) s4 = f(x1+h ,y1+h s3)
  • 8. the value of dependent variable y is computed as : y2 = y1 + hS In the similar manner, starting from second solution point we can compute the third point. The process is repeated till we find the solution in the desired interval. In general, the (i+1)th point of the solution curve is obtained from the ith point using the following equation: yi+1 =yi+ hs Where S = (s1 + 2s2 + 2s3 + s4) /6 and s1 = f(xi,yi) s2 = f(xi+ h/2, yi+ h/2 s1) s3 = f(xi+ h/2, yi+h/2 s2) s4 = f(xi+ h, yi+ hs3)
  • 9. Euler Method  The Euler method can be described as piecewise linear approximation technique to arrive at the solution. In Euler method we are given two starting values (x1,y2) and slope of the curve.  Consider an ordinary different equation dy/dx = f(x,y). Replacing x, y by initial value x1,y1. dy/dx = f(x1,y1) or y1(x1) = f(x1,y1)  Recall the mean value theorem: If a function is continuous and differentiable between two points (x1,y1) and (x2,y2). Then the slope of the line joining the points is derivative at least at one point call it (c, d) of the function. y1(c) = y(x2) –y(x1) / (x2 –x1)
  • 10. Replacing x2 –x1 by h and c by x1. We get : y1(x1) = y(x2) –y(x1) / (x2 –x1) or f(x1,y1) = y(x2) –y(x1) / h y(x2) = h f(x1,y1) + y(x1) y2 = y1+h f(x1,y1) Using this equation we can compute the second point on the solution curve as (x2,y2). Similarly taking (x2,y2) as starting point we can determine : y3 = y2 + h f(x2,y2) In general the (i+1)th point of the solution curve is obtained from ith point using following formula: yi+1 = yi + h f(xi, yi)
  • 11. Modified Eular Method The modified Eular method is a multi step method, which utilizes information from more than one previous step to extrapolate solution curve. the method works correctly only in case of linear function. Alternatively we can calculate the average slope within the interval. Suppose we use interval bound by x =xi and x = xi+1 Average slope =(y1(xi) + y1(xi+1) )/2. Then according to the basic Eular formula: Yi+1 = yi + h/2[y1(xi) + y(xi+1)] Yi+1 = yi + h/2[f(xi,yi) +f(xi+1,yi+1)] This is an improved estimate fo yi+1 at xi+1. but we can’t use it directly since yi+1 is unknown.
  • 12. The value of yi+1 is predicted using basic Eular equation as: ypi+1 = yi + h f(xi, yi) This is called as predictor formula. Using this predicted value, a more accurate value is computed by equation called as corrector formula as follows: yci+1 = yi + h/2[f(xi,yi ) + f (xi+1,ypi+1)]. In general we may conclude Eular method is a two step method: 1. Predict yi+1solution point by using predictor formula. 2. Correct the yi+1solution point using corrector formula.
  • 13. Thank you. reach out to me : rafi.rey@gmail.com or https://www.facebook.com/rafi.dar.98