Initial Value Problem into Euler and Runge-Kutta scheme Having a bit of difficulty with this question:
Convert the initial value problem,
$$\frac{d^2y}{dx^2}-\frac{dy}{dx}+2y=x+1$$ where $$y(0)=2,\ \frac{dy}{dx}(0)=-1,$$
into a set of two coupled first-order initial value problems. 
Firstly I let $$\frac{dy}{dx}=z$$ giving me the equation:
$$\frac{dz}{dx}=z-2y+x+1$$ where $$y(0)=2,\ z(0)=-1,\ x(0)=0$$
Use a step length h = 0.1 to find numerical approximations to y at x = 0.2
using generalizations to two coupled equations of the following numerical
schemes:


*

*Trapezoidal method using the explicit Euler method as a predictor and one iteration of the corrector.


for this method I'm really confused and don't know where to start so any help would be great.


*the third-order Runge-Kutta scheme:
$$k_1 = hf (x_n, y_n)\\
k_2=hf(x_n+\frac{h}{2},y_n+\frac{k_1}{2})\\
k_3=hf(x_n+h,y_n-k_1+2k_2)\\
y_{n+1}=y_n+\frac{1}{6}(k_1+4k_2+k_3)
$$


for this method I'm a little confused I don't know where to start because of the 3 different variables z,y,x I tried starting by doing $$k_1=hz_0$$ and then $$l_1=hf(x_0,y_0)$$ but I found it difficult because of the 3 variables, any help is appreciated thanks.

*

*Trapezoidal method with Euler as predictor  and one corrector step can be implemented as a 3-stage Runge-Kutta method for the vector $u=(y,z)$
\begin{align}
k_1 &= hf(x,u)\\
k_2 &= hf(x+h,u+k_1)\\
k_3 &= hf(x+h,u+0.5(k_1+k_2))\\
u_+ &= u+0.5(k_1+k_3)
\end{align}
I assume that the involved description is to distinguish the method from the explicit trapezoidal method and to compare the 2nd order 3-stage method to the 3rd order 3 stage method of the second point.

*Yes, depending on notation you can expand the scalar method to the vector method that way.
\begin{align}
k_{1y} &= hz \\
k_{1z} &= hf(x,y,z) \\
k_{2y} &= h(z+0.5k_{1z}) \\
k_{2z} &= hf(x+0.5h, y+0.5k_{1y}, z+0.5k_{1z})
\end{align}
etc.
There are only 2 components to this differential equation, the independent variable $x$ has explicitly available updates.
