# Solve a system of second order differential equations

I have a system of second order differential equations which is

$$m_1x_1''=-k_1x_1-k_2(x_1-x_2)\\m_2x_2''=-k_2(x_2-x_1)$$

where $(x_1(0),x_1'(0),x_1(0),x_2'(0))=(1,0,2,0)$ and $(m_1,m_2,k_1,k_2)=(1,1,6,4)$. This problem is asked to solve by using computer, but I want to know to do it by hand. I have no idea how to start solving it by hand. Can someone give me a hint to start? Thanks

• See this. – Mhenni Benghorbal Apr 8 '16 at 1:05
• @MhenniBenghorbal how to apply those initial values – Simple Apr 8 '16 at 1:23
• When you solve the two separate ode's apply these initial conditions. I believe you know how to solve a non homogeneous linear ode! – Mhenni Benghorbal Apr 8 '16 at 1:32
• a simpler way is using Laplace Transform. – K.K.McDonald Apr 8 '16 at 5:22

To directly apply your initial values, I think it's most insightful to write your two-dimensional second order system as a four-dimensional first order system, as \begin{align} x_1' &= p_1, \\ p_1' &= -(k_1+k_2) x_1 + k_2 x_2, \\ x_2' &= p_2, \\ p_2' &= k_2 x_1 - k_2 x_2. \end{align} This system is of the form $\mathbf{y}' = A\, \mathbf{y}$, with $\mathbf{y} = (x_1,p_1,x_2,p_2)$ and $A$ a $4 \times 4$ matrix. To solve this system, see for example here. Note that the initial condition takes the form $\mathbf{y}(0) = (x_1(0),x_1'(0),x_2(0),x_2'(0))$.