AB_predictor

mth-order Adams-Bashforth predictor.

Back to IVP Solver Toolbox Contents.

Contents

Syntax

eqn = AB_predictor(m)
AB_predictor(m,'print')

Description

eqn = AB_predictor(m) returns a string storing the mth-order Adams-Bashforth predictor.

AB_predictor(m,'print') prints the mth-order Adams-Bashforth predictor to the Command Window.

Input/Output Parameters

Variable Symbol Description Format
Input m order of Adams-Bashforth predictor 1×1
double
print - (OPTIONAL) specify as 'print' if you want to print the coefficients to the command window char
Output eqn - mth-order Adams-Bashforth predictor 1×1
string

Example #1: Return a string.

Return the string storing the 3rd-order Adams-Bashforth predictor.

AB3_eqn = AB_predictor(3);

Example #2: 1st-order Adams-Bashforth predictor.

AB_predictor(1,'print');
1st-order Adams-Bashforth predictor:
y(n+1) = y(n) + h(f(n))


Example #3: 2nd-order Adams-Bashforth predictor.

AB_predictor(2,'print');
2nd-order Adams-Bashforth predictor:
y(n+1) = y(n) + (h/2)(3f(n) - f(n-1))


Example #4: 3rd-order Adams-Bashforth predictor.

AB_predictor(3,'print');
3rd-order Adams-Bashforth predictor:
y(n+1) = y(n) + (h/12)(23f(n) - 16f(n-1) + 5f(n-2))


Example #5: 4th-order Adams-Bashforth predictor.

AB_predictor(4,'print');
4th-order Adams-Bashforth predictor:
y(n+1) = y(n) + (h/24)(55f(n) - 59f(n-1) + 37f(n-2) - 9f(n-3))


Example #6: 5th-order Adams-Bashforth predictor.

AB_predictor(5,'print');
5th-order Adams-Bashforth predictor:
y(n+1) = y(n) + (h/720)(1901f(n) - 2774f(n-1) + 2616f(n-2) - 1274f(n-3) + 251f(n-4))


Example #7: 6th-order Adams-Bashforth predictor.

AB_predictor(6,'print');
6th-order Adams-Bashforth predictor:
y(n+1) = y(n) + (h/1440)(4277f(n) - 7923f(n-1) + 9982f(n-2) - 7298f(n-3) + 2877f(n-4) - 475f(n-5))


Example #8: 7th-order Adams-Bashforth predictor.

AB_predictor(7,'print');
7th-order Adams-Bashforth predictor:
y(n+1) = y(n) + (h/60480)(198721f(n) - 447288f(n-1) + 705549f(n-2) - 688256f(n-3) + 407139f(n-4) - 134472f(n-5) + 19087f(n-6))


Example #9: 8th-order Adams-Bashforth predictor.

AB_predictor(8,'print');
8th-order Adams-Bashforth predictor:
y(n+1) = y(n) + (h/120960)(434241f(n) - 1152169f(n-1) + 2183877f(n-2) - 2664477f(n-3) + 2102243f(n-4) - 1041723f(n-5) + 295767f(n-6) - 36799f(n-7))


See also

AB_coefficients | AM_coefficients | AM_corrector | ABM_equations