Problem 1:
Solve the following ordinary differential equation:
7 d^2y/dx^2 - 2 dy/dx - y + x = 0
with the boundary conditions y(0) = 5 and y(20) = 8, using the finite-difference approach with h = 2.
a) Draw the discretized domain with the nodes. Using centered differences for the first and second derivatives, write an approximate expression for the ODE at the interior nodes xi. This generic expression should be valid for all interior nodes.
b) Write the system of equations (i.e. each equation at each interior node).
c) Write the system in matrix format and solve in Matlab using the left matrix divide command
d) Plot your results in Matlab.