Consider the boundary-value problem \(y^{\prime \prime}+x y=0,
y^{\prime}(0)=1\), \(y(1)=-1\).
(a) Find the difference equation corresponding to the differential equation.
Show that for \(i=0,1,2, \ldots, n-1\) the difference equation yields \(n\)
equations in \(n+1\) unknowns \(y_{-1}, y_{0}, y_{1}\), \(y_{2}, \ldots, y_{n-1} .\)
Here \(y_{-1}\) and \(y_{0}\) are unknowns since \(y_{-1}\) represents an
approximation to \(y\) at the exterior point \(x=-h\) and \(y_{0}\) is not specified
at \(x=0\).
(b) Use the central difference approximation (5) to show that \(y_{1}-y_{-1}=2
h\). Use this equation to eliminate \(y_{-1}\) from the system in part (a).
(c) Use \(n=5\) and the system of equations found in parts (a) and (b) to
approximate the solution of the original boundary-value problem.