Home > Numerical methods calculators > Numerical differential equation using Milne's simpson predictor corrector methodexample

2. Milne's simpson predictor corrector method example ( Enter your problem )
  1. Formula & Example-1 `y'=(x+y)/2` (table data)
  2. Example `y'=y-x^3`, Initial value by rk4
  3. Example `y'=x-y^2`, Initial value by rk4
Other related methods
  1. Adams bashforth predictor method
  2. Milne's simpson predictor corrector method

1. Formula & Example-1 `y'=(x+y)/2` (table data)
(Previous example)
3. Example `y'=x-y^2`, Initial value by rk4
(Next example)

2. Example `y'=y-x^3`, Initial value by rk4





2. `y'=y-x^3, y(0)=1`. Find y(0.4) by Milne's simpson predictor corrector method
Step value (h) = 0.1
Initial values by Runge-Kutta 4 method


Solution:
`y'=y-x^3`

Milne's simpson predictor formula is
`y_(n+1,p) = y_(n-3) + (4h)/3 (2y'_(n-2) - y'_(n-1)+ 2y'_(n))`

putting `n=3`, we get

`y_(4,p)=y_0 + (4h)/3 (2y'_1 - y'_2 + 2y'_3) ->(2)`

We have given that
`x_0=0,x_1=0.1,x_2=0.2,x_3=0.3`

Initial values using runge kutta 4 method, we get
`y_0=1,y_1=1.1051,y_2=1.221,y_3=1.3477`


Given `y'=y-x^3, y(0)=1, h=0.1, y(0.3)=?`

Forth order R-K method
`k_1=hf(x_0,y_0)=(0.1)f(0,1)=(0.1)*(1)=0.1`

`k_2=hf(x_0+h/2,y_0+k_1/2)=(0.1)f(0.05,1.05)=(0.1)*(1.0499)=0.105`

`k_3=hf(x_0+h/2,y_0+k_2/2)=(0.1)f(0.05,1.0525)=(0.1)*(1.0524)=0.1052`

`k_4=hf(x_0+h,y_0+k_3)=(0.1)f(0.1,1.1052)=(0.1)*(1.1042)=0.1104`

`y_1=y_0+1/6(k_1+2k_2+2k_3+k_4)`

`y_1=1+1/6[0.1+2(0.105)+2(0.1052)+(0.1104)]`

`y_1=1.1051`

`:.y(0.1)=1.1051`


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

`k_1=hf(x_1,y_1)=(0.1)f(0.1,1.1051)=(0.1)*(1.1041)=0.1104`

`k_2=hf(x_1+h/2,y_1+k_1/2)=(0.1)f(0.15,1.1604)=(0.1)*(1.157)=0.1157`

`k_3=hf(x_1+h/2,y_1+k_2/2)=(0.1)f(0.15,1.163)=(0.1)*(1.1596)=0.116`

`k_4=hf(x_1+h,y_1+k_3)=(0.1)f(0.2,1.2211)=(0.1)*(1.2131)=0.1213`

`y_2=y_1+1/6(k_1+2k_2+2k_3+k_4)`

`y_2=1.1051+1/6[0.1104+2(0.1157)+2(0.116)+(0.1213)]`

`y_2=1.221`

`:.y(0.2)=1.221`


Again taking `(x_2,y_2)` in place of `(x_0,y_0)` and repeat the process

`k_1=hf(x_2,y_2)=(0.1)f(0.2,1.221)=(0.1)*(1.213)=0.1213`

`k_2=hf(x_2+h/2,y_2+k_1/2)=(0.1)f(0.25,1.2816)=(0.1)*(1.266)=0.1266`

`k_3=hf(x_2+h/2,y_2+k_2/2)=(0.1)f(0.25,1.2843)=(0.1)*(1.2687)=0.1269`

`k_4=hf(x_2+h,y_2+k_3)=(0.1)f(0.3,1.3479)=(0.1)*(1.3209)=0.1321`

`y_3=y_2+1/6(k_1+2k_2+2k_3+k_4)`

`y_3=1.221+1/6[0.1213+2(0.1266)+2(0.1269)+(0.1321)]`

`y_3=1.3477`

`:.y(0.3)=1.3477`


`:.y(0.3)=1.3477`


`y'=y-x^3`

`y'_1=y-x^3=1.1041` (where `x=0.1,y=1.1051`)

`y'_2=y-x^3=1.213` (where `x=0.2,y=1.221`)

`y'_3=y-x^3=1.3207` (where `x=0.3,y=1.3477`)


Iteration-1 (for `x_(4)=0.4`)

`y_(4,p)=y_0 + (4h)/3 (2y'_1 - y'_2 + 2y'_3)`

`y_(4,p)=1 + (4*0.1)/3 * (2 * 1.1041 - 1.213 + 2 * 1.3207)`

`y_(4,p)=1 + (0.4)/3 * (2.2083 -1.213 +2.6414)`

`y_(4,p)=1 + (0.4)/3 * (3.6367)`

`y_(4,p)=1 +0.4849`

`y_(4,p)=1.4849`

So, the predicted value is `1.4849`

Now, we will correct it by corrector method to get the final value
`y'_4=y-x^3=1.4209` (where `x=0.4,y=1.4849`)

Milne's simpson corrector formula is
`y_(n+1,c) = y_(n-1) + h/3 (y'_(n-1) + 4y'_(n) + y'_(n+1))`

putting `n=3`, we get

`y_(4,c) = y_2 + h/3 (y'_2 + 4y'_3 + y'_4)`

`y_(4,c) = 1.221 + 0.1/3 * (1.213 + 4 * 1.3207 + 1.4209)`

`y_(4,c) = 1.221 + 0.1/3 * (1.213 +5.2828 +1.4209)`

`y_(4,c) = 1.221 + 0.1/3 * (7.9167)`

`y_(4,c) = 1.221 +0.2639`

`y_4=1.4849`

`:.y(0.4) = 1.4849`



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



1. Formula & Example-1 `y'=(x+y)/2` (table data)
(Previous example)
3. Example `y'=x-y^2`, Initial value by rk4
(Next example)





Share this solution or page with your friends.


 
Copyright © 2024. All rights reserved. Terms, Privacy
 
 

.