Background
I am working on a project for differential equations, and I need to demonstrate to the professor that I am capable of 1) learning new techniques on my own and 2) implementing those techniques in a programming environment (MATLAB, in this case).
My question concerns how to solve a 2nd order system of differential equations using numerical methods. If someone wants to provide a full answer or a sketch of the solution, I would be very happy! Otherwise, just pointing me in the right direction, perhaps to a particular method, website, or book, would be helpful.
Note: While my system of equations can be solved symbolically, the project explicitly calls for the use of numerical methods. I CANNOT use the numerical functions already built into MATLAB. I have to build my own using the appropriate numerical methods.
The System of Equations
I have the following linear 2nd order system of differential equations:
$x''_1 = 4x_1 + 2x_2 + 2cos(3t) \\x''_2 = -4x_2 + 2x_1 + 2x_3 \\x''_3 = -2x_3 + 2x_2$
which has initial conditions $x_1(0) = 0, x_2(0) = 0, x_3(0) = 0, x'_1(0) = 0, x'_2(0) = 0, x'_3(0) = 0$.
The system can be rewritten as a matrix, as seen below.
$\left[ \begin{matrix} x_1'' \\ x_2'' \\ x_3'' \\ \end{matrix} \right]=$ $\left[ \begin{matrix} -4&2&0 \\ 2&-4&2 \\ 0&2&-2 \\ \end{matrix} \right]$ $\left[ \begin{matrix} x_1 \\ x_2 \\ x_3 \\ \end{matrix} \right]$ $+ \left[ \begin{matrix} 2cos(3t) \\ 0 \\ 0 \\ \end{matrix} \right]$
In addition, we can transform this system of 2nd order equations into a system of 1st order equations. Transforming the original three equations yields
$a_1 = x_1 \\ a_2 = x_1' \\ b_1 = x_2 \\ b_2 = x_2' \\ c_1 = x_3 \\ c_2 = x_3'$
$a_1' = a_2 \\ a_2' = -4a_1 + 2b_1 + 2cos(3t) \\ b_1' = b_2 \\ b_2' = -4b_1 + 2a_1 + 2c_1 \\ c'_1 = c_2 \\ c'_2 = -2c_1 + 2b_1$
Now what?
At this point, I'm not sure what to do. I have used Newton's method to approximate simple functions before, but not 2nd order DE's and certainly not a system of DE's.
What methods would be appropriate here? How should I proceed? Any help would be greatly appreciated.