# How to solve a system of differential equations

When I solved one problem, I faced with the need to solve the following system of differential equations:

1) $\ddot{x}(t)-a(t)x(t)-b(t)y(t)-c(t)=0$

2) $\ddot{y}(t)-d(t)y(t)-b(t)x(t)-e(t)=0$

Here $x$, $y$-functions of time: $x=x(t)$, $y=y(t)$;

And $a(t)$, $b(t)$, $c(t)$, $d(t)$, $e(t)$ are known functions of $\cos(\omega t)$, $\sin(\omega t)$ (here $\omega$-constant).

So, I want to find $x(t)$, $y(t)$. Can you help me?

-

If the system were of first order, it would be much easier, since there is a general solution for first order ODEs with variable coefficients. Unfortunately there is no general solution for a second order ODE with variable coefficients. Therefore I would try the following:

Differentiate the first equation with respect to $t$:

$$\frac{d}{dt} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] =\dot{b}(t)y(t) + b(t) \dot{y}(t)$$

Substitute with $y$ from the first equation:

$$\frac{d}{dt} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] =-\frac{\dot{b}(t)}{b(t)} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] + b(t) \dot{y}(t)$$

Again, differentiate with respect to $t$

$$\frac{d^2}{dt^2} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] =- \frac{d}{dt} \left[ \frac{\dot{b}(t)}{b(t)} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] \right] + \dot{b}(t) \dot{y}(t) + b(t) \ddot{y}(t)$$

You can substitute for $\dot{y}(t)$ with the first equation and for $\ddot{y}(t)$ with the second:

$$\frac{d^2}{dt^2} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] =- \frac{d}{dt} \left[ \frac{\dot{b}(t)}{b(t)} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] \right] - \dot{b}(t) \frac{d}{dt} \left[ \frac{\ddot{x}(t)-a(t)x(t)-c(t)}{b(t)} \right] + b(t) \Big[ d(t)y(t)+b(t)x(t)+e(t) \Big]$$

Finally, substitute for $y$

$$\frac{d^2}{dt^2} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] =- \frac{d}{dt} \left[ \frac{\dot{b}(t)}{b(t)} \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] \right] - \dot{b}(t) \frac{d}{dt} \left[ \frac{\ddot{x}(t)-a(t)x(t)-c(t)}{b(t)} \right] - d(t) \Big[ \ddot{x}(t)-a(t)x(t)-c(t) \Big] + b(t) \Big[ b(t)x(t)+e(t) \Big]$$

After some labourous simplifications you will get a 4th order linear ODE with variable coefficients.

-
Why not convert to a first order system? Set $x_1= x$, $x_2=x_1'$, $y_1=y$, $y_2=y_1'$. Then the system of two second order ODE's becomes a system of four first order ODE's: \begin{align} x_1' &= x_2\\ x_2' &= a(t)x_1+b(t)y_1+c(t)\\ y_1' &= y_2\\ y_2' &= d(t)y_1 + b(t)x_1 + e(t) \end{align} – Nicholas Stull Apr 19 at 15:53