Know if a Numerical method gives an exact solution

numerical methodsordinary differential equations

Consider the following 2 step numerical method

$y_{n+1}-y_n=\frac{h}{2}(3f_n -f_{n-1})$

I proved that this method is convergent but the problem asked

Show that for any step size h, the method gives exact solutions to the initial value problems $y'=ax+b$, with $y(x_0)=y_0$

($a,b \in \mathbb{R}$) provided that we choose $y(x_1)=y_1$

Well the exact solution is $y=\frac{a}{2}x²+bx+c$.

How to show that the numerical method gives an exact result?

I tried finding $y_2=y(x_0+2h)$ in the numerical and the exact method and they both gave me the same answer

$y_2= \frac{a}{2}x_0²+ bx_0+ 2ahx_0+ 2bh +2ah²+c$

Is this enough?
Or how do I solve such a question?

Best Answer

Yes, this effort is sufficient. If one step is exact in the claimed generality, then every further step is also exact. Depending on the level of sophistication in your course, this may need to be mentioned explicitly to extensively (i.e., induction proof).