Login
📚 Differential Equations for Engineers
Chapters ▾
⇩ Download ▾

2.1 Second order linear ODEs

Let us consider the general second order linear differential equation

A ( x ) y + B ( x ) y + C ( x ) y = F ( x ) .

We usually divide through by A(x) to get

y + p ( x ) y + q ( x ) y = f ( x ) ,

where p(x)=B(x)A(x), q(x)=C(x)A(x), and f(x)=F(x)A(x). The word linear means that the equation contains no powers nor functions of y, y, and y.

In the special case when f(x)=0 we have a so-called homogeneous equation

y + p ( x ) y + q ( x ) y = 0 ,

(2.1.1)

We have already seen some second order linear homogeneous equations:

y + k 2 y = 0 Two solutions are: y 1 = cos ( k x ) , y 2 = sin ( k x ) . y k 2 y = 0 Two solutions are: y 1 = e k x , y 2 = e k x .

If we know two solutions of a linear homogeneous equation, we know a lot more of them.

That is, we can add solutions together and multiply them by constants to obtain new and different solutions. We call the expression C1y1+C2y2 a linear combination of y1 and y2. Let us prove this theorem; the proof is very enlightening and illustrates how linear equations work.

Proof

Let y=C1y1+C2y2. Then

y + p y + q y = ( C 1 y 1 + C 2 y 2 ) + p ( C 1 y 1 + C 2 y 2 ) + q ( C 1 y 1 + C 2 y 2 ) = C 1 y 1 + C 2 y 2 + C 1 p y 1 + C 2 p y 2 + C 1 q y 1 + C 2 q y 2 = C 1 ( y 1 + p y 1 + q y 1 ) + C 2 ( y 2 + p y 2 + q y 2 ) = C 1 .0 + C 2 .0 = 0

The proof becomes even simpler to state if we use the operator notation. An operator is an object that eats functions and spits out functions (kind of like what a function, which eats numbers and spits out numbers). Define the operator L by

L y = y + p y + q y .

The differential equation now becomes Ly=0. The operator (and the equation) L being linear means that L(C1y1+C2y2)=C1Ly1+C2Ly2. The proof above becomes

L y = L ( C 1 y 1 + C 2 y 2 ) = C 1 L y 1 + C 2 L y 2 = C 1 .0 + C 2 .0 = 0

Two different solutions to the second equation yk2y=0 are y1=cosh(kx) and y2=sinh(kx). Let us remind ourselves of the definition, coshx=ex+ex2 and sinhx=exex2. Therefore, these are solutions by superposition as they are linear combinations of the two exponential solutions.

The functions sinh and cosh are sometimes more convenient to use than the exponential. Let us review some of their properties.

cosh 0 = 1 sinh 0 = 0 , d d x [ cosh x ] = sinh x , d d x [ sinh x ] = cosh x , cosh 2 x sinh 2 x = 1 .

For example, the equation y+k2y=0 with y(0)=b0 and y(0)=b1 has the solution

y ( x ) = b 0 cos ( k x ) + b 1 k sin ( k x )

The equation yk2y=0 with y(0)=b0 and y(0)=b1 has the solution

y ( x ) = b 0 cosh ( k x ) + b 1 k sinh ( k x )

Using cosh and sinh in this solution allows us to solve for the initial conditions in a cleaner way than if we have used the exponentials.

The initial conditions for a second order ODE consist of two equations. Common sense tells us that if we have two arbitrary constants and two equations, then we should be able to solve for the constants and find a solution to the differential equation satisfying the initial conditions.

For example, we found the solutions y1=sinx and y2=cosx for the equation y+y=0. It is not hard to see that sine and cosine are not constant multiples of each other. If sinx=Acosx for some constant A, we let x=0 and this would imply A=0. But then sinx=0 for all x, which is preposterous. So y1 and y2 are linearly independent. Hence,

y=C1cosx+C2sinx

is the general solution to y+y=0.

For two functions, checking linear independence is rather simple. Let us see another example. Consider y2x2y=0. Then y1=x2 and y2=1x are solutions. To see that they are linearly independent, suppose one is a multiple of the other: y1=Ay2, we just have to find out that A cannot be a constant. In this case we have A=y1y2=x3, this most decidedly not a constant. So y=C1x2+C21x is the general solution.

If you have one solution to a second order linear homogeneous equation, then you can find another one. This is the reduction of order method. The idea is that if we somehow found y1 as a solution of y+p(x)y+q(x)y=0 we try a second solution of the form y2(x)=y1(x)v(x). We just need to find v. We plug y2 into the equation:

0=y2+p(x)y2+q(x)y2=y1v+2y1v+y1v+p(x)(y1v+y1v)+q(z)y1v=y1v+(2y1+p(x)y1)v+\cancelto0(y1+p(x)y1+q(x)y1)v.

In other words, y1v+(2y1+p(x)y1)v=0. Using w=v we have the first order linear equation y1w+(2y1+p(x)y1)w=0. After solving this equation for w (integrating factor), we find v by antidifferentiating w. We then form y2 by computing y1v. For example, suppose we somehow know y1=x is a solution to y+x1yx2y=0. The equation for w is then xw+3w=0. We find a solution, w=Cx3, and we find an antiderivative v=C2x2. Hence y2=y1v=C2x. Any C works and so C=2 makes y2=1x. Thus, the general solution is y=C1x+C21x.

Since we have a formula for the solution to the first order linear equation, we can write a formula for y2:

y2(x)=y1(x)ep(x)dx(y1(x))2dx

However, it is much easier to remember that we just need to try y2(x)=y1(x)v(x) and find v(x) as we did above. Also, the technique works for higher order equations too: you get to reduce the order for each solution you find. So it is better to remember how to do it rather than a specific formula.

We will study the solution of nonhomogeneous equations in Section 2.5. We will first focus on finding general solutions to homogeneous equations.

Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.