2. Runge-Kutta 2 method (1st order derivative) example ( Enter your problem )
  1. Formula-1 & Example-1
  2. Example-2
  3. Example-3
  4. Formula-2 & Example-1
  5. Example-2
  6. Example-3
Other related methods
  1. Euler method (1st order derivative)
  2. Runge-Kutta 2 method (1st order derivative)
  3. Runge-Kutta 3 method (1st order derivative)
  4. Runge-Kutta 4 method (1st order derivative)
  5. Improved Euler method (1st order derivative)
  6. Modified Euler method (1st order derivative)
  7. Taylor Series method (1st order derivative)
  8. Euler method (2nd order derivative)
  9. Runge-Kutta 2 method (2nd order derivative)
  10. Runge-Kutta 3 method (2nd order derivative)
  11. Runge-Kutta 4 method (2nd order derivative)

4. Formula-2 & Example-1
(Previous example)
6. Example-3
(Next example)

5. Example-2





Find y(0.5) for `y'=-2x-y`, `x_0=0, y_0=-1`, with step length 0.1 using Runge-Kutta 2 method (1st order derivative)

Solution:
Given `y'=-2x-y, y(0)=-1, h=0.1, y(0.5)=?`

Method-1 : Using formula `k_2=f(x_0+h,y_0+hk_1)`

Second order R-K method
`k_1=f(x_0,y_0)=f(0,-1)=1`

`k_2=f(x_0+h,y_0+hk_1)=f(0.1,-0.9)=0.7`

`y_1=y_0+h/2(k_1+k_2)=-1+0.085=-0.915`

`:.y(0.1)=-0.915`


Again taking `(x_1,y_1)` in place of `(x_0,y_0)` and repeat the process

`k_1=f(x_1,y_1)=f(0.1,-0.915)=0.715`

`k_2=f(x_1+h,y_1+hk_1)=f(0.2,-0.8435)=0.4435`

`y_2=y_1+h/2(k_1+k_2)=-0.915+0.0579=-0.8571`

`:.y(0.2)=-0.8571`


Again taking `(x_2,y_2)` in place of `(x_1,y_1)` and repeat the process

`k_1=f(x_2,y_2)=f(0.2,-0.8571)=0.4571`

`k_2=f(x_2+h,y_2+hk_1)=f(0.3,-0.8114)=0.2114`

`y_3=y_2+h/2(k_1+k_2)=-0.8571+0.0334=-0.8237`

`:.y(0.3)=-0.8237`


Again taking `(x_3,y_3)` in place of `(x_2,y_2)` and repeat the process

`k_1=f(x_3,y_3)=f(0.3,-0.8237)=0.2237`

`k_2=f(x_3+h,y_3+hk_1)=f(0.4,-0.8013)=0.0013`

`y_4=y_3+h/2(k_1+k_2)=-0.8237+0.0112=-0.8124`

`:.y(0.4)=-0.8124`


Again taking `(x_4,y_4)` in place of `(x_3,y_3)` and repeat the process

`k_1=f(x_4,y_4)=f(0.4,-0.8124)=0.0124`

`k_2=f(x_4+h,y_4+hk_1)=f(0.5,-0.8112)=-0.1888`

`y_5=y_4+h/2(k_1+k_2)=-0.8124-0.0088=-0.8212`

`:.y(0.5)=-0.8212`


`:.y(0.5)=-0.8212`

`n``x_n``y_n``k_1``k_2``x_(n+1)``y_(n+1)`
00-110.70.1-0.915
10.1-0.9150.7150.44350.2-0.8571
20.2-0.85710.45710.21140.3-0.8237
30.3-0.82370.22370.00130.4-0.8124
40.4-0.81240.0124-0.18880.5-0.8212




Method-2 : Using formula `k_2=f(x_0+h/2,y_0+(hk_1)/2)`

Second order R-K method
`k_1=f(x_0,y_0)=f(0,-1)=1`

`k_2=f(x_0+h/2,y_0+(hk_1)/2)=f(0.05,-0.95)=0.85`

`y_1=y_0+hk_2=-1+0.085=-0.915`

`:.y(0.1)=-0.915`


Again taking `(x_1,y_1)` in place of `(x_0,y_0)` and repeat the process

`k_1=f(x_1,y_1)=f(0.1,-0.915)=0.715`

`k_2=f(x_1+h/2,y_1+(hk_1)/2)=f(0.15,-0.8792)=0.5792`

`y_2=y_1+hk_2=-0.915+0.0579=-0.8571`

`:.y(0.2)=-0.8571`


Again taking `(x_2,y_2)` in place of `(x_1,y_1)` and repeat the process

`k_1=f(x_2,y_2)=f(0.2,-0.8571)=0.4571`

`k_2=f(x_2+h/2,y_2+(hk_1)/2)=f(0.25,-0.8342)=0.3342`

`y_3=y_2+hk_2=-0.8571+0.0334=-0.8237`

`:.y(0.3)=-0.8237`


Again taking `(x_3,y_3)` in place of `(x_2,y_2)` and repeat the process

`k_1=f(x_3,y_3)=f(0.3,-0.8237)=0.2237`

`k_2=f(x_3+h/2,y_3+(hk_1)/2)=f(0.35,-0.8125)=0.1125`

`y_4=y_3+hk_2=-0.8237+0.0112=-0.8124`

`:.y(0.4)=-0.8124`


Again taking `(x_4,y_4)` in place of `(x_3,y_3)` and repeat the process

`k_1=f(x_4,y_4)=f(0.4,-0.8124)=0.0124`

`k_2=f(x_4+h/2,y_4+(hk_1)/2)=f(0.45,-0.8118)=-0.0882`

`y_5=y_4+hk_2=-0.8124-0.0088=-0.8212`

`:.y(0.5)=-0.8212`


`:.y(0.5)=-0.8212`

`n``x_n``y_n``k_1``k_2``x_(n+1)``y_(n+1)`
00-110.850.1-0.915
10.1-0.9150.7150.57920.2-0.8571
20.2-0.85710.45710.33420.3-0.8237
30.3-0.82370.22370.11250.4-0.8124
40.4-0.81240.0124-0.08820.5-0.8212





This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



4. Formula-2 & Example-1
(Previous example)
6. Example-3
(Next example)





Share this solution or page with your friends.
 
 
Copyright © 2025. All rights reserved. Terms, Privacy
 
 

.