In Problems 3–12 use the RK4 method with  to obtain a four decimal approximation of the indicated value

In Problems 3–12 use the RK4 method with  to obtain a four decimal approximation of the indicated value:

I chose to do #3:       \f$y'=2x-3y+1\f$  ;       \f$y(1)=5\texttt{ ; }y(1.5)\texttt{ ; }h=0.1\f$

When looking for our solution we are to use the most commonly used set of values for the parameters, steps to follow:

\f[y_{n+1}=y_n+\frac{h}{6}(k_1+2k_2+2k_3+k_4)\texttt{ where:}\f]

\f[k_1=f(x_n,y_n)\f]

\f[k_2=f(x_n+\frac{1}{2}h,y_n+\frac{1}{2}hk_1)\f]

\f[k_3=f(x_n+\frac{1}{2}h,y_n+\frac{1}{2}hk_2)\f]

\f[k_4=f(x_n+h,y_n+hk_3)\f]

Now that we have the formula that we will be using we need to plug and play our original equations information:

Edit: for  \f$k_1\f$  originally I came up with the solution 8 because I had placed the x and y variables in the wrong position.

Step 1: Find \f$k_1\f$  

\f[k_1=f(x,y)\Rightarrow 2x-3y+1\Rightarrow 2(1)-3(5)+1=-12\f]

Step 2: Find \f$k_2\f$

\f[k_2=x+\frac{h}{2},y+\frac{h}{2}k_1\Rightarrow 1+\frac{0.1}{2},5+\frac{0.1}{2}(-12)=5.45\f]

Step 3: Find  \f$k_3\f$

\f[k_3=x+\frac{h}{2},y+\frac{h}{2}k_2\Rightarrow 1+\frac{0.1}{2},5+\frac{0.1}{2}(5.45)=6.3225\f]

Step 4: Find  \f$k_4\f$

\f[k_4=x+h,y+hk_3\Rightarrow 1+0.1,5+0.1(6.3225)=6.7323\f]

Step 5: Find our  \f$y_1\f$

\f[y_1=y+\frac{h}{6}(k_1+2k_2+2k_3+k_4)\Rightarrow 1+\frac{0.1}{6}(-12+10.9+12.645+6.7323)=1.3046\f]

This is the Runge Kutta Method, have I mentioned that the name is fantastic? Well, it is. In our book it says, “You are advised to look carefully at the formulas in (6); note that k2 depends on
k1, k3 depends on k2, and k4 depends on k3.” I definitely recommend paying close attention to variables and where you place them. I have made multiple mistakes when placing numbers and keeping everything in line. I got it now though.