# Higher Order Ordinary Differential Equations (ODEs)

A linear ODE of order $n$ has the general form:
$$a_n(x)\frac{d^n y}{dx^n} + a_{n-1}(x)\frac{d^{n-1} y}{dx^{n-1}} + \dots + a_1(x)\frac{dy}{dx} + a_0(x)y = f(x).$$ If $f(x) = 0$ then the equation is called homogeneous; otherwise it is inhomogeneous. The general solution to Eq. (1) will contain $n$ arbitrary constants.

In order to solve any equation of the form (1), we must first find the general solution of the complementary equation:
$$a_n(x)\frac{d^n y}{dx^n} + a_{n-1}(x)\frac{d^{n-1} y}{dx^{n-1}} + \dots + a_1(x)\frac{dy}{dx} + a_0(x)y = 0.$$ The general solution of Eq. (2) will contain $n$ linearly independent functions, say $y_1(x), y_2(x), \dots, y_n(x)$. Then the general solution is given by:
$$y_c(x) = c_1y_1(x) + c_2y_2(x) + \dots + c_ny_n(x);$$ where the $c_i$ are arbitrary constants that may be determined if $n$ boundary conditions are provided. For $n$ functions to be linearly independent over an interval, there must not exist any set of constants $c_1, c_2, \dots, c_n$ such that:
$$c_1y_1(x) + c_2y_2(x) + \dots + c_ny_n(x) = 0$$ over that interval except for the trivial case:
$$c_1 = c_2 = \dots = c_n = 0.$$ A simple method to solve the homogeneous higher order ODE will be illustrated in this section. But first, another way to approach to the solution of this types of equations is going to be discussed. Sometimes it is more convenient to convert a higher order ODE to a set of first order ODEs. In the following, this method is presented.

# Turning a higher order ODE to a system of 1st-order ODEs

For simplicity, we will consider a 3rd-order ODE in the following form:
$$a_3(x)\frac{d^3 y}{dx^3} + a_2(x)\frac{d^2 y}{dx^2} + a_1(x)\frac{dy}{dx} + a_0(x)y = f(x).$$ Considering $t_0 = y, t_1 = \frac{dy}{dx}, t_2 = \frac{d^2 y}{dx^2}$ it is possible to rewrite Eq. (6) as a system of 1st-order equations:
$$\begin{cases} & t_0' = t_1 \\ & t_1' = t_2 \\ & at_2' + bt_2 + ct_1 + dt_0 = f(x) \end{cases}$$ in which $(\cdot)'$ represents the derivation with respect to $x$. Applying proper boundary conditions, the system of ODEs can be easily solved.

# Finding solutions for homogeneous equations

Now let us consider the homogeneous form of the Eq. (6): $$a_3(x)\frac{d^3 y}{dx^3} + a_2(x)\frac{d^2 y}{dx^2} + a_1(x)\frac{dy}{dx} + a_0(x)y = 0.$$ Associating the ODE of 3rd-order to a correspondent algebraic equation, we have:
$$\frac{d^k y}{dx^k} \longleftrightarrow \lambda ^k \ \ \Rightarrow \ \ a_3\lambda ^3 + a_2\lambda ^2 + a_1\lambda + a_0 = 0;$$ and the solution in general form can be represented as:
$$y = \sum\limits_{i=1}^3 C_i e^{\lambda _i x}.$$ In a particular case of $a_0 = 0$, we can rewrite Eq. (9):
$$\lambda (a_3\lambda ^2 + a_2\lambda + a_1) = 0;$$ which leads to the following roots: $$\begin{cases} & \lambda_1 = 0 \\ & \lambda_{2,3} = \frac{-a_2 \pm \sqrt{a_2^2-4a_3a_1}}{2a_3} \end{cases}$$ Therefore, the solution can be written: $$y = C_1 + C_2 e^{\lambda_2 x} + C_3 e^{\lambda_3 x};$$ and the constants $C_1, C_2, C_3$ can be found applying boundary conditions.