"Find the values of alpha, beta, and gamma in the following difference method:

$\displaystyle w_{j+4} - w_{j+2} +\alpha (w_{j+3} - w_{j+1}) = h[\beta (f_{j+3} - 4f_{j+1}) + \gamma f_{j+2})$"

---------------------

I started by Taylor expanding all the terms in h. For example:

$\displaystyle w_{j+2} = w(x_j + 2h) = w_j + 2hf_j + \frac{9}{2}h^2 f_j' + \frac{9}{2}h^3 f_j'' + O(h^4)$ and

$\displaystyle f_{j+2} = f(x_j + 2h) = f_j + 2hf_j' + 2h^2 f_j'' + O(h^3)$

and so on for the other terms.

My two questions are:

1. What do I do with the f' and f'' terms? Should f' become (f_(i+1) - f_i)/h, etc.?

2. Once I have done all of this, is it as simple as plugging in all the w's and f's into the original difference equation, isolating like terms, and solving for alpha, beta, and gamma?