Boundary value problem

6y 2. (60 points) Consider solving the boundary value problem d2y = — over the interval [2, 4] with dx2 x2 boundary conditions y(2) = 1 and y(4) = 8. In this part, you will implement a single MATLAB program that uses the linear shooting method as follows:

(a) Transform the problem into a system of two first-order equations by introducing a variable z = dy dx (

b) Assume z(2) = 0 and execute Euler’s method with step size h = 0.1 to obtain y(4). (within the main program)

(c) Assume z(2) = 3 and employ Euler’s method with step size h = 0.1 to obtain y(4). (within the main program)

(d) Using the guesses for z(2) in parts (b) and (c) and the corresponding results for y(4) obtained, interpolate to find the necessary guess G to get the desired result y(4) = 8. (use the formula given in notes) (e) Assume z(2) = G and employ Euler’s method with step size h = 0.1 to obtain y(4).

(g) Find the exact solution to the boundary value problem. Show your work. Compare your approximate values of the solution y(x) corresponding to G in part (e) against this exact solution to the BVP by plotting them on the same figure.