Home > Numerical methods calculators > Numerical differential equation using Adams bashforth predictor method example

1. Adams bashforth predictor 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 Adams bashforth predictor method
Step value (h) = 0.1
Initial values by Runge-Kutta 4 method


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

Adam's Bashforth Predictor formula is
`y_(n+1,p) = y_n + h/24 (55y'_(n) - 59y'_(n-1) + 37y'_(n-2) - 9y'_(n-3))`

putting `n=3`, we get

`y_(4,p)=y_3 + h/24 (55y'_(3) - 59y'_2 + 37y'_1 - 9y'_0) ->(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'_0=y-x^3=1` (where `x=0,y=1`)

`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_3 + h/24 (55y'_(3) - 59y'_2 + 37y'_1 - 9y'_0)`

`y_(4,p)=1.3477 + 0.1/24 * (55 * 1.3207 - 59 * 1.213 + 37 * 1.1041 - 9 * 1)`

`y_(4,p)=1.3477 + 0.1/24 * (72.6388 -71.5662 +40.8534 -9)`

`y_(4,p)=1.3477 + 0.1/24 * (32.926)`

`y_(4,p)=1.3477 +0.1372`

`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`)

Adam's Bashforth Corrector formula is
`y_(n+1,c) = y_n + h/24 (9y'_(n+1) + 19y'_(n) - 5y'_(n-1) + y'_(n-2))`

putting `n=3`, we get

`y_(4,c) = y_3 + h/24 (9y'_4 + 19y'_3 - 5y'_2 + y'_1)`

`y_(4,c) = 1.3477 + 0.1/24 * (9 * 1.4209 + 19 * 1.3207 - 5 * 1.213 + 1.1041)`

`y_(4,c) = 1.3477 + 0.1/24 * (12.7881 +25.0934 -6.0649 +1.1041)`

`y_(4,c) = 1.3477 + 0.1/24 * (32.9207)`

`y_(4,c) = 1.3477 +0.1372`

`y_(4,c)=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
 
 

.