Second-order Ordinary Differential Equations cheatsheet
Star

By Afshine Amidi and Shervine Amidi

General case

General form The general form of a second-order ODE can be written as a function $F$ of $x, y, y'$ and $y''$ as follows:

\[\boxed{F(x,y,y',y'')=0}\]

Methods of resolution The table below summarizes the general tricks to apply when the ODE has the following classic forms:


Old form Trick New form
$\displaystyle F\left(x,y',y''\right)=0$ $\displaystyle y'\triangleq u$, $\quad\displaystyle y''=\frac{du}{dx}$ $G\left(x,u,\frac{du}{dx}\right)=0$
$\displaystyle F\left(y,y',y''\right)=0$ $\displaystyle y'\triangleq u$, $\quad\displaystyle y''=u\frac{du}{dy}$ $G\left(y,u,\frac{du}{dy}\right)=0$
$\displaystyle F\left(y',y''\right)=0$ $\displaystyle y'\triangleq u, \quad y''=\frac{du}{dx}$

$\displaystyle y'\triangleq u,\quad y''=u\frac{du}{dy}$
Missing-$y$ approach
$G\left(u,\frac{du}{dx}\right)=0$

Missing-$x$ approach
$G\left(u,\frac{du}{dy}\right)=0$

Standard form of a linear ODE The standard form of a second-order linear ODE is expressed with $p$, $q$ and $r$ known functions of $x$ such that:

\[\boxed{y''+p(x)y'+q(x)y=r(x)}\]

for which the total solution $y$ is the sum of a homogeneous solution $y_h$ and a particular solution $y_p$:

\[\boxed{y = y_h + y_p}\]

Remark: if $r=0$, then the ODE is homogeneous (and we have $y_p = 0$). If $r\neq0$, then the ODE is said to be inhomogeneous.


Linear dependency Two functions $y_1$, $y_2$ are said to be linearly dependent if $\frac{y_2}{y_1}=C$ constant.
Conversely, they are linearly independent if $\frac{y_2}{y_1}\neq C$.


Linear homogeneous

Variable coefficients

Method of reduction of order Let $y_1$ be a solution to the equation $y''+p(x)y'+q(x)y=0$. By noting $C_1$, $C_2$ constants, the global solution $y_h$ is written as:

\[\boxed{y_h=C_1y_1+C_2y_1\int\frac{e^{-\int pdx}}{y_1^2}dx}\]

Remark: Here, for any function $p$, the notation $\int pdx$ denotes the primitive of $p$ without additive constant.


Constant coefficients

General form The general form of a linear homogeneous second-order ODE with $a,b,c$ constant coefficients is:

\[\boxed{ay''+by'+cy=0}\]

Resolution Based on the types of solution of the characteristic equation $\boxed{a\lambda^2+b\lambda+c=0}$, and by noting $\boxed{\Delta=b^2-4ac}$ its discriminant, we distinguish the following cases:


Name Case Roots Solution
Two distinct real roots $\Delta>0$ $\displaystyle\lambda_1=\frac{-b+\sqrt{\Delta}}{2a}$

$\displaystyle\lambda_2=\frac{-b-\sqrt{\Delta}}{2a}$
$y_h=C_1e^{\lambda_1x}+C_2e^{\lambda_2x}$
Double real root $\Delta=0$ $\displaystyle\lambda=-\frac{b}{2a}$ $y_h=[C_1+C_2x]e^{\lambda x}$
Complex conjugate roots $\Delta<0$ $\displaystyle\lambda_1=\alpha+i\beta$

$\displaystyle\lambda_2=\alpha-i\beta$

where $\alpha=-\frac{b}{2a}$

and $\beta=\frac{\sqrt{|\Delta|}}{2a}$
$y_h=\left[C_1\cos(\beta x)+C_2\sin(\beta x)\right]e^{\alpha x}$

A special case: the Euler-Cauchy equation

General form The Euler-Cauchy equation is a special case of linear homogeneous ODEs and has the following general form, where each $a_i\in\mathbb{R}$ is a constant coefficient:

\[\boxed{a_nx^ny^{(n)}+a_{n-1}x^{n-1}y^{(n-1)}+...+a_1xy'+a_0y=0}\]

Second-order case For $n=2$, by noting $y=x^m$, the ODE provides the indicial equation:

\[\boxed{am^2+(b-a)m+c=0}\]

with discriminant $\boxed{\Delta=(b-a)^2-4ac}$ and where the resolution of the ODE depends on the cases summarized in the table below.

Name Case Roots Solution
Two distinct real roots $\Delta>0$ $\displaystyle m_1=\frac{-b+a+\sqrt{\Delta}}{2a}$

$\displaystyle m_2=\frac{-b+a-\sqrt{\Delta}}{2a}$
$y_h=C_1x^{m_1}+C_2x^{m_2}$
Double real root $\Delta=0$ $\displaystyle m=-\frac{b-a}{2a}$ $y_h=[C_1+C_2\ln|x|]x^{m}$
Complex conjugate roots $\Delta<0$ $\displaystyle m_1=\alpha+i\beta$

$\displaystyle m_2=\alpha-i\beta$

where $\alpha=-\frac{b-a}{2a}$

and $\beta=\frac{\sqrt{|\Delta|}}{2a}$
$y_h=\left[C_1\cos(\beta \ln|x|)+C_2\sin(\beta \ln|x|)\right]x^{\alpha}$


Linear inhomogeneous

Variable coefficients

Wronskian Given $y_1$ and $y_2$ the two solutions of the homogeneous equation, we define the Wronskian $W$ as follows:

\[\boxed{W=y_1y_2'-y_2y_1'}\]

Method of Variation of Parameters The particular solution $y_p$ of the inhomogeneous ODE is given by:

\[\boxed{y_p=-y_1\int\frac{y_2r}{W}dx+y_2\int\frac{y_1r}{W}dx}\]

Constant coefficients

Undetermined coefficients method The particular solution $y_p$ of the inhomogeneous ODE $ay'' + by' + cy = r(x)$ is determined from the correspondance table below:

Form of $r$ Form of $y_p$
$C$ $A$
$x^n$, $n\in\mathbb{N}^*$ $A_0+A_1x+...+A_nx^n$
$e^{\gamma(x)}$ $Ae^{\gamma x}$
$\cos(\omega x)$ or $\sin(\omega x)$ $A\cos(\omega x)+B\sin(\omega x)$
$x^ne^{\gamma x}\cos(\omega x)$ or $x^ne^{\gamma x}\sin(\omega x)$ $(A_0+A_1x+...+A_nx^n)\cos(\omega x)e^{\gamma x}+$
$(B_0+B_1x+...+B_nx^n)\sin(\omega x)e^{\gamma x}$

Remark: all new constants are determined after plugging back $y_p$ into the ODE.


Modification rule If the particular solution $y_p$ picked from the above table matches either $y_1$ or $y_2$, then has to be multiplied by the lowest power of $x$ such that it is no more the case.


Sum rule If $r(x)$ is a sum of functions of the first column of the above table, then $y_p$ is the sum of its associated particular solutions.