Multistep methods

We discussed in class two formulas that are from a general type:

The explict Adams Bashworth method

$$~ x_{n+2} = x_{n+1} + \frac{3}{2} f(t_{n+1}, x_{n+1}) - \frac{1}{2} hf(t_n, x_n). ~$$

The implicit Adams Moulton method:

$$~ x_{n+2} = x_{n+1} + h (\frac{5}{12} f(t_{n+2}, x_{n+2}) + \frac{2}{3} f(t_{n+1}, x_{n+1}) - \frac{1}{12} f(t_n, x_n)) ~$$

The implicit one offers advantages, but can't be used directly.

The predictor-corrector method uses the first to predict $x_{n+2}$ with, say $x^*_{n+2}$, and then uses this on the right hand side of the implicit one.

Create some compute code to solve the equation over the $[0,2]$ using $h=1/10$.

$$~ x'(t) = x - t^2 + 1, \quad x(t_0) = 1/2 ~$$

Your answer should be your code, and the points or a graph of the solution. Use one step of Euler's method to generate $x_1$.