# ABM_equations

## Syntax

```ABM_equations(m)
```

## Description

ABM_equations(m) prints the mth-order Adams-Bashforth-Moulton predictor-corrector equations to the Command Window.

## Input/Output Parameters

 Variable Symbol Description Format Input m $\inline&space;m$ order of Adams-Bashforth-Moulton method 1×1double

## Example #1: 1st-order Adams-Bashforth-Moulton equations.

```ABM_equations(1);
```
```1st-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + h(f(n))
y(n+1) = y(n) + h(f(t(n+1),yp(n+1)))

```

## Example #2: 2nd-order Adams-Bashforth-Moulton equations.

```ABM_equations(2);
```
```2nd-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/2)(3f(n) - f(n-1))
y(n+1) = y(n) + (h/2)(f(t(n+1),yp(n+1)) + f(n))

```

## Example #3: 3rd-order Adams-Bashforth-Moulton equations.

```ABM_equations(3);
```
```3rd-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/12)(23f(n) - 16f(n-1) + 5f(n-2))
y(n+1) = y(n) + (h/12)(5f(t(n+1),yp(n+1)) + 8f(n) - f(n-1))

```

## Example #4: 4th-order Adams-Bashforth-Moulton equations.

```ABM_equations(4);
```
```4th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/24)(55f(n) - 59f(n-1) + 37f(n-2) - 9f(n-3))
y(n+1) = y(n) + (h/24)(9f(t(n+1),yp(n+1)) + 19f(n) - 5f(n-1) + f(n-2))

```

## Example #5: 5th-order Adams-Bashforth-Moulton equations.

```ABM_equations(5);
```
```5th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/720)(1901f(n) - 2774f(n-1) + 2616f(n-2) - 1274f(n-3) + 251f(n-4))
y(n+1) = y(n) + (h/720)(251f(t(n+1),yp(n+1)) + 646f(n) - 264f(n-1) + 106f(n-2) - 19f(n-3))

```

## Example #6: 6th-order Adams-Bashforth-Moulton equations.

```ABM_equations(6);
```
```6th-order Adams-Bashforth-Moulton method:
yp(n+1) = y(n) + (h/1440)(4277f(n) - 7923f(n-1) + 9982f(n-2) - 7298f(n-3) + 2877f(n-4) - 475f(n-5))
y(n+1) = y(n) + (h/1440)(475f(t(n+1),yp(n+1)) + 1427f(n) - 798f(n-1) + 482f(n-2) - 173f(n-3) + 27f(n-4))

```

## Example #7: 7th-order Adams-Bashforth-Moulton equations.

```ABM_equations(7);
```
```7th-order Adams-Bashforth-Moulton method:
yp(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))
y(n+1) = y(n) + (h/60480)(19087f(t(n+1),yp(n+1)) + 65112f(n) - 46461f(n-1) + 37504f(n-2) - 20211f(n-3) + 6312f(n-4) - 863f(n-5))

```

## Example #8: 8th-order Adams-Bashforth-Moulton equations.

```ABM_equations(8);
```
```8th-order Adams-Bashforth-Moulton method:
yp(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))
y(n+1) = y(n) + (h/120960)(36799f(t(n+1),yp(n+1)) + 139849f(n) - 121797f(n-1) + 123133f(n-2) - 88547f(n-3) + 41499f(n-4) - 11351f(n-5) + 1375f(n-6))

```