Linear system of ODEs

Consider two functions $y_1$ and $y_2$, $$ \begin{cases} \dot y_1 &= ay_1 + by_2 + f_1(t), \\ \dot y_2 &= cy_1 + dy_2 + f_2(t). \end{cases} $$

Solving systems of linear ODEs by substitution open_in_new

$$ \begin{align*} \ddot y_1 &= a\dot y_1 + b(cy_1 + dy_2 + f_2) + \dot f_1 \\ &= a\dot y_1 + bcy_1 + d(by_2) + bf_2 + \dot f_1 \\ &= a\dot y_1 + bcy_1 + d(\dot y_1 - ay_1 - f_1) + bf_2 + \dot f_1 \\ \end{align*} $$ and this is a linear second-order ODE with constant coefficient.

Solving systems of linear ODEs by matrix methods open_in_new

We can write this in vector form $$ \dv Y = M\v Y + \v F$$ where $$ \v Y = \pmat{y_1\\y_2}, \v F = \pmat{ f_1 \\ f_2 }, M = \pmat{a&b \\ c&d}. $$

To look for complementary solution $\v Y_c$, we guess $$ \v Y_c = \v v e^{\lambda t}.$$ Then $$ M\v v = \lambda\v v, $$ so $\lambda$ is an eigenvalue of $M$ and $\v v$ is the eigenvector.

If there are $n$ distinct eigenvalues, then there will be $n$ linearly independent complimentary functions.

If the forcing term is a complementary function, then try $\v Y_p = (\v a + \v bt)e^{\lambda t}$.

Example

Non-degenerate phase portraits of system of first-order linear equations open_in_new

A system of first-order linear ODEs has a phase portrait with points $$ \v Y = \pmat{y_1 \\ y_2 \\ \vdots \\ y_n}. $$

For the equation $\dv Y = M\v Y$, consider the non-degenerate general solution $$ \v Y(t) = \v v_1 e^{\lambda_1 t} + \v v_2 e^{\lambda_2 t}, \quad 0\neq \lambda_1 \neq \lambda_2 \neq 0. $$

$\v 0$ is a fixed point. The phase portraits depend on $\lambda_1, \lambda_2$:

  • $\lambda_1, \lambda_2\in\R$

    $\v v_1, \v v_2$ are real.

    • Opposite signs (WLOG $\lambda_1 > 0$ and $\lambda_2 < 0$): this is called saddle node.

    • $\lambda_1, \lambda_2>0$ (WLOG $|\lambda_1| > |\lambda_2|$): unstable node

    • $\lambda_1, \lambda_2 < 0$ (WLOG $|\lambda_1| > |\lambda_2|$): stable node

  • $\lambda_1, \lambda_2 \not\in \R$

    Then since $M$ is real, $\lambda_2 = \lambda_1^*$. Also $\lambda_1^* \v v_1^* = (M\v v_1)^* = M\v v_1^*$ so $\v v_2 = C\v v_1^*$. Then $$ \begin{align*} \v Y(t) = e^{\Re(\lambda_1)t} \Re\left(2\v v_1 e^{i\Im(\lambda_1) t}\right). \end{align*} $$ (Derivation)

    • If $\mrm{Re}(\lambda_1) < 0$, then this is a stable spiral:

    • If $\mrm{Re}(\lambda_2) > 0$, then this is an unstable spiral.

    • If $\mrm{Re}(\lambda_1) = 0$, then this is a centre:

    To find out the direction of rotation, evaluate $\dv Y$ at any point, such as determining the sign of $\dot y_2$ at $\v Y = (1, 0)^T$.