# Ordinary Differential Equations/Homogenous 1

## Homogeneous Equations of Constant Coefficients

Consider a DE of the form

${\displaystyle p_{0}(x){\frac {d^{n}y}{dx^{n}}}+\ldots +p_{n-1}(x){\frac {dy}{dx}}+p_{n}(x)y=f(x)}$

Constant coefficients refers to the left hand side of a differential equation - the coefficients of all terms of y,(i.e. p1(x), etc) are constants. While this may seem unrealistic, this actually happens frequently in electric circuits and harmonic motion.

"Homogeneous" refers to the right hand side of the equation. If f(x)=0, the equation is homogeneous, if it isn't, it is nonhomogenous. Again, it seems useless but it isn't. And it makes for a much easier to solve problem. We'll deal with nonhomogenous equations later.

So a homogenous equation of constant coefficients is an equation of the form

${\displaystyle {\frac {d^{n}y}{dx^{n}}}+c_{1}{\frac {d^{n-1}y}{dx^{n-1}}}+c_{2}{\frac {d^{n-2}y}{dx^{n-2}}}+\ldots +c_{n}y=0}$

where c1, c2, etc are all constants.

## Second order equations

In order to show how these equations are solved, lets start with the most basic case - a second order equation

${\displaystyle A{\frac {d^{2}y}{dx^{2}}}+B{\frac {dy}{dx}}+Cy=0}$

where A, B, and C are constants.

### The Auxiliary Quadratic

For a DE

${\displaystyle a{\frac {d^{2}y}{dx^{2}}}+b{\frac {dy}{dx}}+cy=0,}$

Make the following substitution:

${\displaystyle y=e^{mx}\,}$

This gives also

${\displaystyle {\frac {dy}{dx}}=me^{mx}\,}$
${\displaystyle {\frac {d^{2}y}{dx^{2}}}=m^{2}e^{mx}\,}$

The DE is now

${\displaystyle am^{2}e^{mx}+bme^{mx}+ce^{mx}=0\,}$

Dividing by ${\displaystyle e^{mx}}$ gives (note:${\displaystyle e^{mx}}$ can never equal zero)

${\displaystyle am^{2}+bm+c=0\,}$

This is the auxiliary quadratic (AQ) of the DE. There are four classes of outcomes to the auxiliary quadratic:

1. ${\displaystyle b^{2}-4ac>0,\,}$, giving two distinct, real, roots.
2. ${\displaystyle b^{2}-4ac=0,\,}$, giving two coincident real, roots.
3. ${\displaystyle b^{2}-4ac<0,\,}$, giving complex roots.
a: Purely imaginary roots.
b: Complex-conjugate pair.

The method of solution of the DE depends on the class of AQ.

### Class 1: Distinct, Real Roots

Consider the DE

${\displaystyle {\frac {d^{2}y}{dx^{2}}}+{\frac {dy}{dx}}-6y=0}$

The AQ is

${\displaystyle m^{2}+m-6=0\,}$
${\displaystyle (m+3)(m-2)=0\,}$

This gives us the following roots:

${\displaystyle m=2,\ m=-3}$

Going back to the substitution we made to obtain the AQ, we have

${\displaystyle y=e^{2x},\ y=e^{-3x}}$

as two distinct solutions to the DE. According to the superposition principle, the general solution is therefore

${\displaystyle y=Ae^{2x}+Be^{-3x}\,}$

#### General Solution to Class 1 DEs

Generalizing, for the Second Order DE
${\displaystyle a{\frac {d^{2}y}{dx^{2}}}+b{\frac {dy}{dx}}+cy=0}$
with the auxiliary quadratic given by
${\displaystyle am^{2}+bm+c=0\,}$
with roots α and β, the general solution is
${\displaystyle y=Ae^{\alpha x}+Be^{\beta x}\,}$

### Class 2: Coincident, Real Roots

Consider the DE

${\displaystyle {\frac {d^{2}y}{dx^{2}}}-4{\frac {dy}{dx}}+4y=0}$

The AQ is

${\displaystyle m^{2}-4m+4=0\,}$
${\displaystyle (m-2)(m-2)=0\,}$

so, ${\displaystyle e^{2x}\,}$ is a solution. However, we cannot have it as both solutions as the factor of two produced will be absorbed into the constant, leaving us with only one constant, and therefore a DE without a full solution.

For the other solution we will use the Method of Reduction of Order. To do so we assume that it is in the form of:

${\displaystyle y_{2}=u(x)y_{1}=u(x)e^{2x}\,}$

At the end we will check if our assumption is correct. We will now substitute this equation and solve for u(x)

${\displaystyle y_{2}''-4y_{2}'+4y_{2}=0\,}$
${\displaystyle u''(x)e^{2x}+2u'(x)e^{2x}+2u'(x)e^{2x}+4u(x)e^{2x}-4(u'(x)e^{2x}+2u(x)e^{2x})+4u(x)e^{2x}=0\,}$
${\displaystyle u''(x)e^{2x}=0\,}$
${\displaystyle e^{2x}\,}$ is always non-zero so the only way the product can equal zero is if:
${\displaystyle u''(x)=0\,}$

Integrating twice offers

${\displaystyle u(x)=a_{1}x+a_{2}\,}$

Therefore

${\displaystyle y_{2}=(a_{1}x+a_{2})y_{1}\,}$
${\displaystyle y_{2}=(a_{1}x+a_{2})e^{2x}\,}$

Our general solution is:

${\displaystyle y=C_{1}y_{1}+C_{2}y_{2}\,}$
${\displaystyle y=C_{1}e^{2x}+C_{2}(a_{1}x+a_{2})e^{2x}\,}$
${\displaystyle y=(C_{1}+a_{2})e^{2x}+C_{2}a_{1}xe^{2x}\,}$

Because each constant is arbitrary we can simply write

${\displaystyle y=C_{1}e^{2x}+C_{2}xe^{2x}\,}$

The Method of Reduction of Order can be used on different equations and u(x) does not always equal x. You can see below that ${\displaystyle y=xe^{x}}$ is a valid solution.

${\displaystyle y=xe^{2x}\,}$
${\displaystyle {\frac {dy}{dx}}=2xe^{2x}+e^{2x}=e^{2x}(2x+1)\,}$
${\displaystyle {\frac {d^{2}y}{dx^{2}}}=2e^{2x}+2e^{2x}(2x+1)=e^{2x}(4x+4)\,}$

To check substitute these into the original DE:

${\displaystyle e^{2x}(4x+4)-4e^{2x}(2x+1)+4xe^{2x}=0\,}$
${\displaystyle 4xe^{2x}+4e^{2x}-8xe^{2x}-4e^{2x}+4xe^{2x}=0\,}$
${\displaystyle 0=0\,}$

Therefore, ${\displaystyle y=xe^{2x}\,}$ is a solution as well.

#### General Solution to Class 2 DEs

Generalizing, for the Second Order DE
${\displaystyle a{\frac {d^{2}y}{dx^{2}}}+b{\frac {dy}{dx}}+cy=0}$
with the coincident root α of the AQ, the general solution is
${\displaystyle y=(A+Bx)e^{\alpha x}\,}$

### Class 3a: Purely Imaginary Roots

To have complex roots, the AQ must have a discriminant less than zero, so

${\displaystyle b^{2}-4ac<0\,}$

Also, for the solution to be purely imaginary, the value of b must be exactly zero.

Therefore,

${\displaystyle 4ac>0\,}$

This means that a and c have to have the same signs: either a and c are both positive or they are both negative. If we consider our general second-order DE:

${\displaystyle a{\frac {d^{2}y}{dx^{2}}}+b{\frac {dy}{dx}}+cy=0}$

Setting b to zero gives

${\displaystyle a{\frac {d^{2}y}{dx^{2}}}+cy=0}$

Dividing through by a gives

${\displaystyle {\frac {d^{2}y}{dx^{2}}}+{\frac {c}{a}}y=0}$.

Therefore, the y term is always positive, and this can be represented by

${\displaystyle {\frac {d^{2}y}{dx^{2}}}+\omega ^{2}y=0}$.

(I'm using ω here as it is used for simple harmonic motion, which is the primary use of this DE). There are now two paths to the solution of the DE. The first relies on us spotting that we can use the cyclical nature of trig. functions when derived. Substitute the following

${\displaystyle y=\cos \omega x\,}$
${\displaystyle {\frac {dy}{dx}}=-\omega \sin \omega x\,}$
${\displaystyle {\frac {d^{2}y}{dx^{2}}}=-\omega ^{2}\cos \omega x\,}$

And check in our DE:

${\displaystyle {\frac {d^{2}y}{dx^{2}}}+\omega ^{2}y=-\omega ^{2}\cos \omega x+\omega ^{2}\cos \omega x=0}$

This checks out, so ${\displaystyle \cos \omega x\,}$ is a solution. A similar result holds true for the substitution using ${\displaystyle y=\sin \omega x\,}$.

Our solutions are therefore

${\displaystyle y=\cos \omega x\,}$
${\displaystyle y=\sin \omega x\,}$

So the general solution is

${\displaystyle y=A\cos \omega x+B\sin \omega x.\,}$

The other method of solving this equation is to use Euler's Formula:

${\displaystyle e^{\omega ix}=\cos \omega x+i\sin x\,}$
and
${\displaystyle e^{-\omega ix}=\cos \omega x-i\sin x\,}$

From our original DE, we have an AQ of

${\displaystyle m^{2}+\omega ^{2}=0\,}$

giving us roots of

${\displaystyle m=\pm i\omega \,}$

so the general solution, similar to the Class 1 DEs, is

${\displaystyle y=Ae^{\omega ix}+Be^{-\omega ix}\,}$
${\displaystyle y=A(\cos \omega x+i\sin \omega x)+B(\cos \omega x-i\sin \omega x)\,}$
${\displaystyle y=(A+B)\cos \omega x+i(A-B)\sin \omega x\,}$

Since A and B are arbitrary, we can set new constants for convenience, letting our new A equal A+B and our new B equal i(A-B).

Thus we have as our general solution

${\displaystyle y=A\cos \omega x+B\sin \omega x\,}$

#### General Solution to Class 3a DEs

Generalizing, for the Second Order DE
${\displaystyle {\frac {d^{2}y}{dx^{2}}}+\omega ^{2}y=0}$
the general solution is
${\displaystyle y=A\cos \omega x+B\sin \omega x\,}$

### Class 3b: Complex Conjugate Roots

Since it is a proven theorem that complex roots of polynomials always occur in conjugate pairs, the only remaining class of AQ is the one with complex conjugates for solutions.

Given that the solutions are complex, we know that in the AQ

${\displaystyle am^{2}+bm+c=0\,}$
${\displaystyle b^{2}-4ac,<0,\ b\neq 0\,}$ (see Class 3a).

The roots of this are in the form

${\displaystyle (p\pm iq)\,}$

The general solution is then

${\displaystyle y=Ae^{(p+iq)x}+Be^{(p-iq)x}\,}$
${\displaystyle y=e^{px}\left(Ae^{iqx}+Be^{-iqx}\right)\,}$

From Euler's Formulas, we can now get

${\displaystyle y=e^{px}\left(A\left(\cos qx+i\sin qx\right)+B\left(\cos qx-i\sin qx\right)\right)\,}$
${\displaystyle y=e^{px}\left((A+B)\cos qx+i(A-B)\sin qx\right)\,}$

As A and B are arbitrary, we can collapse them as in Class 3a, so that we have the general solution

${\displaystyle y=e^{px}\left(A\cos qx+B\sin qx\right)\,}$

#### General Solution to Class 3b DEs

Generalizing, for the Second Order DE
${\displaystyle a{\frac {d^{2}y}{dx^{2}}}+b{\frac {dy}{dx}}+cy=0}$
with an AQ with roots
${\displaystyle m=p\pm iq,}$
The general solution is
${\displaystyle y=e^{px}\left(A\cos qx+B\sin qx\right)\,}$

We have now covered all possible types of homogeneous second-order differential equation, and we didn't even have to integrate anything! We will now have a look at higher order equivalents.

## nth-Order Equations

How do we expand the above to the nth order? Well, the nth order has the same requirements of orders of x as second order equations do. So we still need functions involving ${\displaystyle e^{mx}}$. There's just 2 major differences. Firstly, we'll have more terms - we won't just be able to plug into the auxiliary quadratic equation to get the roots. Secondly, there are more roots. We'll end up with n roots, so y will be the sum of n equations.

### An Example of a Third-Order Equation

Consider the third-order DE

${\displaystyle {\frac {d^{3}y}{dx^{3}}}-4{\frac {d^{2}y}{dx^{2}}}-7{\frac {dy}{dx}}+6y=0}$.

Find the roots of the auxiliary cubic equation of the form

${\displaystyle m^{3}-4m^{2}-7m+6=0\,}$
${\displaystyle m=-1,2,3\,}$

Our distinct solutions are therefore

${\displaystyle y=e^{-x},\ e^{2x},\ e^{3x}\,}$

This gives us a general solution

${\displaystyle y=Ae^{-x}+Be^{2x}+Ce^{3x}\,}$