### Homogeneous Second Order Differential Equations

#### Definition

A linear homogeneous second order ODE with constant coefficients is an ordinary differential equation in the form:

$a \frac{\mathrm{d}^2y}{\mathrm{d} x^2} + b \frac{\mathrm{d} y}{\mathrm{d} x} + cy = 0,$

where $a$, $b$ and $c$ are constants.

Note: A differential equation is homogeneous if it can be written in the form $Ly=0$ where $L$ is a linear differential operator. Here:

$L=a\frac{\mathrm{d}^2}{\mathrm{d} x^2}+b\frac{\mathrm{d{\mathrm{d} x}+c,$

and the differential equation can be written in the form:

$\left(a\frac{\mathrm{d}^2}{\mathrm{d} x^2}+b\frac{\mathrm{d{\mathrm{d} x}+c\right)y=0.$

}} }}

If the right-hand side of a differential equation is not $0$ then it is referred to as an inhomogeneous or forced differential equation.

#### Solving a Homogeneous Second Order ODE

To solve an ODE in the above form, assume that the solution is in the form $y(x)= e^{\lambda x}$. Then $y'(x)=\lambda e^{\lambda x}$ and $y''(x)=\lambda^2 e^{\lambda x}$, where the prime notation denotes the derivative with respect to $x$.

Substituting these expressions into the ODE gives

$a\lambda^2 e^{\lambda x} + b\lambda e^{\lambda x} + c e^{\lambda x} = 0.$

Dividing through by $e^{\lambda x}$ gives the auxiliary equation:

$a\lambda^2 + b\lambda + c = 0.$

For suitable values of $a$, $b$ and $c$ it may be possible to solve this quadratic for $\lambda$ by factorising. If a simple factorisation can't be found it is possible to use the quadratic formula to solve for $\lambda$:

$\lambda_{1,2} = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$

where $\lambda_1$ is given by calculating the formula with a plus and $\lambda_2$ is given by calculating the formula with a minus. There are three possible types of solution to the auxiliary equation, each leading to a different form of solution to the differential equation:

##### 1) Distinct real roots

If $b^2-4ac>0$, the auxiliary equation will yield two real numbers $\lambda_1$ and $\lambda_2$. Recall that the solution to the differential equation was assumed to be of the form $y(x)= e^{\lambda x}$. Hence the two values of $\lambda$ yield two solutions to the differential equation: $y_1= e^{\lambda_1x}$ and $y_2= e^{\lambda_2x}$.

To form the general solution, note that the linearity of the ODE means that any linear combination of solutions is also a solution. Furthermore, a second order differential equation problem will involve two boundary conditions, so the general solution to a second order differential equation must contain two arbitrary constants.

The general solution is therefore given by multiplying each solution $y_1$ and $y_2$ by an arbitrary constant, and then adding them together:

$y(x) = A e^{\lambda_1x} + B e^{\lambda_2x}.$

If boundary conditions are given, a particular solution can be found by solving for $A$ and $B$.

##### 2) Repeated real roots

If $b^2-4ac=0$ then $\lambda_1$ will be the same as $\lambda_2$, i.e. $\lambda_1=\lambda_2$. The subscript is no longer necessary and the single solution to the auxiliary equation can be denoted $\lambda$. However, as this is a second order problem there will be two boundary conditions, so two arbitrary constants are required for the general solution. It can be shown that the correct form of the general solution in the case of repeated roots is given by:

$y(x) = A e^{\lambda x}+Bx e^{\lambda x}.$

##### 3) Complex roots

If $b^2-4ac<0$, then the solutions to the quadratic will be complex numbers. The two roots will be complex conjugates of each other:

$\lambda_1 = \alpha + i \beta,\qquad \lambda_2 = \alpha - i\beta,$

where $\alpha$ and $\beta$ are real numbers. Expressing the solution in the form $y(x)= e^{\lambda x}$ gives:

$y(x)=C e^{(\alpha+i\beta)x}+D e^{(\alpha-i\beta)x},$

where $A$ and $B$ are constants. However, this form of the solution appears to be complex, and the solution to the differential equation is assumed to be real. The solution can be rewritten by making use of Euler's formula:

\begin{align} y(x) &= C e^{\alpha+i\beta}+D e^{\alpha-i\beta} \\ &= e^{\alpha x}\Bigl[C e^{i\beta x}+D e^{-i\beta x}\Bigl] \\ &= e^{\alpha x}\Bigl[C(\cos{\beta x}+i\sin{\beta x})+D(\cos{\beta x}-i\sin{\beta x})\Bigl] \\ &= e^{\alpha x}\Bigl[(C+D)\cos{\beta x}+i(C-D)\sin{\beta x}\Bigl] \\ &= e^{\alpha x}\Bigl[A\cos{\beta x}+B\sin{\beta x}\Bigl], \end{align}

where $A$ and $B$ are arbitrary real constants.

Hence the general solution is given by:

$y(x) = e^{\alpha x} \Bigl[A\cos(\beta x) + B\sin(\beta x)\Bigl].$

It is important to notice that the real part $\alpha$ is used only in the exponential part of the solution, and the imaginary part $\beta$ is used only in the trigonometric parts.

#### Worked Examples

###### Example 1

Find the general solution to the differential equation:

$\frac{\mathrm{d}^2y}{\mathrm{d} x^2} - 2\frac{\mathrm{d} y}{\mathrm{d} x} - 3y = 0$

and then find the particular solution that satisfies the initial conditions $y(0) = 0$ and $y'(0) = 1$.

###### Solution

The auxiliary equation is:

$\lambda^2-2\lambda-3 = 0.$

This can be factorised:

$(\lambda-3)(\lambda+1) = 0,$

hence the solutions to the auxiliary equation are $\lambda_1 = 3$ and $\lambda_2 = -1$.

There are two distinct, real roots so the general solution to the differential equation is given by:

\begin{align} y(x) &= A e^{\lambda_1x} + B e^{\lambda_2x} \\ &=A e^{3x} + B e^{-x}. \end{align}

$A$ and $B$ can be found by applying the initial conditions. The first initial condition is $y(0)=0$, i.e. $y = 0$ when $x = 0$. Substituting these values into the general solution gives:

$y(0) = A e^{3 \cdot 0} + B e^0 = A + B = 0.$

The second initial condition is $y'(0)=1$, i.e. the derivative of $y$ is equal to $1$ when $x$ is $0$. The derivative of the general solution is:

$y'(x) = 3A e^{3x} - B e^{-x}.$

Substituting $y'(0)=1$ and $x=0$ into this expression gives:

$1 = 3A-B.$

These two equations for $A$ and $B$ can be solved simultaneously to find:

$A = \frac{1}{4}, \qquad B = -\frac{1}{4}.$

Thus the particular solution for the given initial conditions is:

$y(x) = \frac{1}{4} e^{3x} - \frac{1}{4} e^{-x}.$

###### Video Example 1

Newcastle University Maths-Aid finds the general solution to the differential equation $\displaystyle \frac{\mathrm{d}^2y}{\mathrm{d} x^2}-2\frac{\mathrm{d} y}{\mathrm{d} x}-3y=0$ and then finds the particular solution that satisfies $y(0)=0$ and $y'(0)=1$.

###### Example 2

Find the general solution to the equation:

$4y'' - 4y' + y = 0$

and then find the particular solution that satisfies the boundary conditions $y(0) = 0$, $y(2) = e$.

###### Solution

First notice that the equation has been expressed using prime notation, and is equivalent to:

$4\frac{\mathrm{d}^2y}{\mathrm{d} x} - 4\frac{\mathrm{d} y}{\mathrm{d} x} + y = 0.$

The auxiliary equation is:

$4\lambda^2 - 4\lambda + 1 = 0.$

Since this quadratic can't be immediately factorised, the quadratic formula is the most appropriate method for finding the roots:

\begin{align} \lambda_{1,2} &= \frac{4 \pm \sqrt{(-4)^2 - 4 \cdot 4 \cdot 1} }{2 \cdot 4} \\ &=\frac{4 \pm \sqrt{0} }{8} \\ &=\frac{1}{2} \end{align}

There is only one value for $\lambda$, which is $\lambda = \frac{1}{2}$, and we have a repeated root.

Recall that the general solution in the case of repeated roots is given by

$y(x) = A e^{\lambda x}+Bx e^{\lambda x}.$

Hence the general solution for the given differential equation is given by:

$y(x) = A e^{\large{ \frac{x}{2} } }+Bx e^{\large{ \frac{x}{2} } }.$

$A$ and $B$ can be found by applying the boundary conditions. The first boundary condition is $y(0)=0$ , i.e. $y=0$ when $x=0$ . Substituting these values into the general solution gives:

$y(0) = A e^{0 }+B\cdot0 e^{0} = A = 0.$

Hence, $A = 0$.

The second boundary condition is $y(2)= e$ , i.e. $y= e$ when $x=2$ . Substituting these values into the general solution gives, and recalling that $A=0$, gives

$y(2) = 2B e^{\frac{2}{2} } = e.$

$B$ can be isolated by dividing through by $e$:

$2B = 1 \Rightarrow B = \frac{1}{2}.$

The particular solution for these boundary conditions is therefore:

$y(x) = \frac{1}{2}x e^{\large{ \frac{x}{2} } }.$

###### Video Example 2

Newcastle University Maths-Aid finds the general solution to the differential equation $4y''-4y'+y=0$, and then finds the particular solution that satisfies $y(0)=0$ and $y(2)= e$.

###### Example 3

Find the general solution to the equation:

$2y'' + 6y' + 5y = 0.$

and then find the particular solution that satisfies the initial conditions $y(0) = 1$ and $y'(0) = - \frac{1}{2}$.

###### Solution

The auxiliary equation is:

$2\lambda^2 + 6\lambda + 5 = 0$

Since this quadratic can't be immediately factorised, the quadratic formula is the most appropriate method for finding the roots:

$\lambda_{1,2} = \frac{-6 \pm \sqrt{6^2 - 4 \cdot 2 \cdot 5} }{2 \cdot 2}.$

The expression appearing within the square root, the discriminant, is $6^2 - 4 \cdot 2 \cdot 5 = -4<0$. The roots of the auxiliary equation are therefore complex:

\begin{align} \lambda_{1,2} &= -\frac{6}{4}\pm\frac{\sqrt{-4} }{4} \\ &= -\frac{3}{2}\pm\frac{2}{4}\sqrt{-1} \\ &= - \frac{3}{2} \pm i\frac{1}{2}.\end{align}

Recall that the general solution in the case of complex roots is given by:

$y(x) = e^{\alpha x} \Bigl[A\cos(\beta x) + B\sin(\beta x)\Bigl],$

where $\alpha$ is the real part of the roots $\lambda_{1,2}$ and $\beta$ is the imaginary part.

Here $\alpha = -\frac{3}{2}$ and $\beta = \frac{1}{2}$. Notice that the $\pm$ sign is not included when reading off $\beta$. The general solution for the given differential equation is therefore:

$y(x) = e^{\large{-\frac{3}{2}x } } \Bigl[A\cos \left( \frac{x}{2} \right) + B\sin \left( \frac{x}{2} \right) \Bigl].$

$A$ and $B$ can be found by applying the given initial conditions. The first initial condition is $y(0)=1$, i.e. $y=1$ when $x=0$. Substituting these values into the general solution gives:

$y(0) = e^0 \bigl[A\cos(0) + B\sin(0)\bigl] = A = 1,$

hence $A=1$.

The second initial condition is $y ′ (0)=-\dfrac{1}{2}$, i.e. the derivative of $y$ is equal to $-\dfrac{1}{2}$ when $x$ is $0$. The derivative of the general solution is:

$y'(x) = -\frac{3}{2} e^{\large{-\frac{3}{2}x } } \Bigl[ A\cos \left( \frac{x}{2} \right) + B\sin \left( \frac{x}{2} \right) \Bigl] + e^{\large{-\frac{3}{2}x } } \Bigl[ -\frac{A}{2}\sin \left( \frac{x}{2} \right) + \frac{B}{2}\cos \left( \frac{x}{2} \right) \Bigl].$

Note that this derivative was computed using the product rule.

Substituting $y'(0)=-\dfrac{1}{2}$ and $x=0$ into this expression gives:

\begin{align} -\dfrac{1}{2} &= -\frac{3}{2}e^0 (1 \cdot \cos(0) + B \sin(0)) + e^0 \Bigl[ -\frac{1}{2}\sin(0) + \frac{B}{2}\cos(0) \Bigl] \\ &= -\frac{3}{2} + \frac{B}{2} \end{align}

Solving this gives $B = 2$. The particular solution satisfying the given initial conditions is therefore:

$y(x) = e^{\large{-\frac{3}{2}x } } \Bigl[ \cos\left( \frac{x}{2} \right) + 2\sin\left(\frac{x}{2}\right) \Bigl].$

###### Video Example 3

Newcastle University Maths-Aid finds the general solution to the differential equation $2y''+6y'+5y=0,$ and then finds the particular solution that satisfies $y(0)=1$ and $y'(0)=-\dfrac{1}{2}$.

###### Example 4

Find the general solution to the equation:

$\frac{\mathrm{d}^2y}{\mathrm{d} x^2} - 3\frac{\mathrm{d} y}{\mathrm{d} x} = 0.$

###### Solution

Recall that the auxiliary equation for a differential equation in the form $a\dfrac{\mathrm{d}^2 y}{\mathrm{d} x^2}+b\dfrac{\mathrm{d} y}{\mathrm{d} x}+cy=0$ is given by:

$a\lambda^2+b\lambda+c=0.$

In this equation, there is no term involving $y$. Hence $c=0$ and the auxiliary equation is:

$\lambda^2 - 3\lambda = 0.$

This equation factorises:

$\lambda(\lambda-3) = 0,$

giving the solutions $\lambda_1 = 0$ and $\lambda_2 = 3$.

The correct general solution is therefore:

$y(x) = A e^{0x} + B e^{3x}.$

Note: a common mistake is to forget to include the term for $\lambda_1=0$ in the solution.

Since $e^0=1$, the solution can be written more simply as:

$y(x) = A + B e^{3x}.$

###### Video Example 4

Newcastle University Maths-Aid finds the general solution to the differential equation $\displaystyle \frac{\mathrm{d}^2y}{\mathrm{d} x^2}-3\frac{\mathrm{d} y}{\mathrm{d} x}=0$.

###### Example 5

Find the general solution to the equation:

$\frac{\mathrm{d}^2y}{\mathrm{d} x^2} + \frac{\mathrm{d} y}{\mathrm{d} x} - 2y = 0,$

and then find the particular solution that satisfies the boundary conditions $y(0) = 1$ and $y\to0$ as $x\to\infty$.

###### Solution

The auxiliary equation is:

$\lambda^2 + \lambda - 2 = 0.$

$(\lambda-1)(\lambda+2) = 0,$

giving solutions $\lambda_1=1$, $\lambda_2=-2$.

The general solution to the differential equation is therefore:

$y(x) = A e^x + B e^{-2x}.$

$A$ and $B$ can be found by applying the boundary conditions. The second boundary condition, $y\to0$ as $x\to\infty$, requires $y$ to approach zero as $x$ gets very large. Unlike previous examples, this boundary condition cannot be applied by simply substituting numbers into the equation; it is necessary to examine each term individually.

First consider $A e^x$. Since $e^x\to\infty$ as $x\to\infty$, that is $e^x$ gets very large as $x$ gets very large, the term $A e^x$ will not approach zero for a non-zero constant $A$. This means that to satisfy the boundary condition $A$ is forced to be zero, i.e. $A=0$.

Now consider $B e^{-2x}$. Since $e^{-2x}\to0$ as $x\to\infty$, that is $e^{-2x}$ approaches zero as $x$ gets very large, the term $B e^{-2x}$ will also approach zero as $x$ gets very large for any constant $B$. Hence the second term satisfies the second boundary condition, and the solution is reduced to:

$y(x)=B e^{-2x}.$

The first boundary condition, $y(0)=1$, can now be applied to find $B$:

$y(0) = Be^0 = B = 1.$

The particular solution satisfying the given boundary conditions is therefore:

$y(x) = e^{-2x}.$

###### Video Example 5

Newcastle University Maths-Aid finds the general solution to the differential equation $\displaystyle \frac{\mathrm{d}^2y}{\mathrm{d} x^2}+\frac{\mathrm{d} y}{\mathrm{d} x}-2y=0$ and then finds the particular solution that satisfies $y(0)=1$ and $y\to0$ as $x\to\infty$.

#### Video Examples

###### Example 1 - Repeated Roots

Prof. Robin Johnson finds the general solution of $\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2}+8\dfrac{\mathrm{d}y}{\mathrm{d}x}+16y=0$.

###### Example 2 - Complex Roots

Prof. Robin Johnson finds the general solution of $\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2}-6\dfrac{\mathrm{d}y}{\mathrm{d}x}+13y=0$.

#### Workbook

This workbook produced by HELM is a good revision aid, containing key points for revision and many worked examples. 