online advertising

Tuesday, September 8, 2015

Coupled differential equation

Today morning, I am having fun solving this coupled differential equation pair.

$ \dot{X} = \left[\begin{array}{cc} 1 & -4 \\ 4 & 1\end{array}\right] X + \left[\begin{array}{c} 4t + 9e^{6t}\\-t+e^{6t} \end{array}\right] $

With initial conditions $ X(0) = \frac{1}{17}\left[\begin{array}{c}21\\35\end{array}\right] $

The key to solving this puzzle is to decouple the equations, to do that, we diagonalize the matrix. I get this handy equation:

$ \left[\begin{array}{cc} 1 & -4 \\ 4 & 1\end{array}\right] = \frac{1}{2}\left[\begin{array}{cc} 1 & 1 \\ -i & i\end{array}\right]\left[\begin{array}{cc} 1 +4i & 0 \\ 0 & 1 - 4i\end{array}\right]\left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right] $

We substitute this back to the equation, we see something interesting.


$ \begin{eqnarray} \dot{X} &=& \frac{1}{2}\left[\begin{array}{cc} 1 & 1 \\ -i & i\end{array}\right]\left[\begin{array}{cc} 1 +4i & 0 \\ 0 & 1 - 4i\end{array}\right]\left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right] X + \left[\begin{array}{c} 4t + 9e^{6t}\\-t+e^{6t} \end{array}\right] \\ \left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right]\dot{X} &=& \frac{1}{2}\left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right]\left[\begin{array}{cc} 1 & 1 \\ -i & i\end{array}\right]\left[\begin{array}{cc} 1 +4i & 0 \\ 0 & 1 - 4i\end{array}\right]\left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right] X + \left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right]\left[\begin{array}{c} 4t + 9e^{6t}\\-t+e^{6t} \end{array}\right] \\ \left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right]\dot{X} &=& \left[\begin{array}{cc} 1 +4i & 0 \\ 0 & 1 - 4i\end{array}\right]\left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right] X + \left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right]\left[\begin{array}{c} 4t + 9e^{6t}\\-t+e^{6t} \end{array}\right] \\ \end{eqnarray} $

It is now obvious that we should let $ Y = \left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right]X $. That would then give

$ \begin{eqnarray} \dot{Y} &=& \left[\begin{array}{cc} 1 +4i & 0 \\ 0 & 1 - 4i\end{array}\right]Y + \left[\begin{array}{cc} 1 & i \\ 1 & -i\end{array}\right]\left[\begin{array}{c} 4t + 9e^{6t}\\-t+e^{6t} \end{array}\right] \\ \end{eqnarray} $

Now we have decoupled the equations. Let $ Y = \left[\begin{array}{c}y_1\\y_2\end{array}\right] $, we have two separate equations instead of a coupled pair, which can be solved separately.

$ \begin{eqnarray} y_1'(t) &=& (1 + 4i)y_1(t) + (4t + 9e^{6t}) + i(-t + e^{6t}) \\ y_2'(t) &=& (1 - 4i)y_2(t) + (4t + 9e^{6t}) - i(-t + e^{6t}) \end{eqnarray} $

Just so we are not lost, we also let $ X = \left[\begin{array}{c}x_1\\x_2\end{array}\right] $, and therefore we have these relations:

$ \begin{eqnarray} y_1 &=& x_1 + ix_2 \\ y_2 &=& x_1 - ix_2 \\ \end{eqnarray} $

Let's try to solve it with Laplace's transform. For the first equation, taking Laplace's transform on both sides give this:

$ \begin{eqnarray} y_1'(t) &=& (1 + 4i)y_1(t) + (4t + 9e^{6t}) + i(-t + e^{6t}) \\ &=& (1 + 4i)y_1(t) + (4-i)t + (9+i)e^{6t} \\ \mathcal{L}(y_1'(t)) &=& \mathcal{L}((1 + 4i)y_1(t) + (4-i)t + (9+i)e^{6t}) \\ sY_1(s) - y_1(0) &=& (1 + 4i)Y_1(s) + \frac{4-i}{s^2} + \frac{9+i}{s - 6} \\ sY_1(s) - (1 + 4i)Y_1(s) &=& y_1(0) + \frac{4-i}{s^2} + \frac{9+i}{s - 6} \\ (s - 1 - 4i)Y_1(s) &=& \frac{21 + 35i}{17} + \frac{4-i}{s^2} + \frac{9+i}{s - 6} \\ Y_1(s) &=& \frac{21 + 35i}{17(s - 1 - 4i)} + \frac{4-i}{s^2(s - 1 - 4i)} + \frac{9+i}{(s - 6)(s - 1 - 4i)} \\ \end{eqnarray} $

Without repeating, we get, similarly, that

$ \begin{eqnarray} Y_2(s) &=& \frac{21 - 35i}{17(s - 1 + 4i)} + \frac{4+i}{s^2(s - 1 + 4i)} + \frac{9-i}{(s - 6)(s - 1 + 4i)} \\ \end{eqnarray} $

The rest is just ugly partial fractions and inverse Laplace transform.

No comments:

Post a Comment