I am attempting to learn from a textbook that has the following question:
The boundary-value problem $$ y'' = 4(y-x), \qquad 0 \leq x \leq 1, \qquad y(0)=0, \, \, \, y(1)=2 $$ has the solution $y(x) = e^2(e^4 -1)^{-1} (e^{2x}-e^{-2x})+x$. Use the linear shooting method to approximate the solution, and compare the results to the actual solution. Also, $h = \frac{1}{2}$.
This is not mentioned in the question itself, but by looking at the solution, I believe the solution wants us to give the numerical approximation of $y(0.5)$. Thank you.
So I'm mostly just focusing on the "approximate the solution" section. I've read so many textbooks but I just can't get my head around it, so I'm having to ask on here. I see that you make an initial approximation $y'(a) = \lambda$. And then you use a linear equation in the form:
$$\lambda = \frac{\beta - y_o(b)}{z(b)}$$ to determine $\lambda$.
I also think we can use:
$$y_\lambda(x) = y_0(x) + \lambda z(x)$$
I also know you get two equations. I have done it in this manner:
$$y'(x) = z(x)$$ $$z'(x) = 4y(x)-4x$$
And we then want to find $y_0(x)$ and $z(x)$ I think?. Using Euler's or Runge-Kutta or something? Let us use Runge-Kutta 4 for the sake of this post.
Any help is appreciated. I'm also stuck on the non-linear version, but I'm just going to try and get my head around the linear version for now... I also know this isn't the best written question, sorry. I'm just very lost.
Edit: As nobody has gotten the answer yet it seems, I thought I would post it. The textbook answer is: "0.82432432" as the approximation. Anybody know how to get that result? Thank you.