Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

2.1: Second order linear ODEs

( \newcommand{\kernel}{\mathrm{null}\,}\)

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,

We have already seen some second order linear homogeneous equations:

y+k2y=0Two solutions are:y1=cos(kx),y2=sin(kx).yk2y=0Two solutions are:y1=ekx,y2=ekx.

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

Theorem 2.1.1: Superposition

Suppose y1 and y2 are two solutions of the homogeneous equation (???). Then

y(x)=C1y1(x)+C2y2(x),

also solves (???) for arbitrary constants C1 and C2.

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+py+qy=(C1y1+C2y2)+p(C1y1+C2y2)+q(C1y1+C2y2)=C1y1+C2y2+C1py1+C2py2+C1qy1+C2qy2=C1(y1+py1+qy1)+C2(y2+py2+qy2)=C1.0+C2.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

Ly=y+py+qy.

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

Ly=L(C1y1+C2y2)=C1Ly1+C2Ly2=C1.0+C2.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.

cosh0=1sinh0=0,ddx[coshx]=sinhx,ddx[sinhx]=coshx,cosh2xsinh2x=1.

Exercise 2.1.1

Derive these properties using the definitions of sinh and cosh in terms of exponentials.

Linear equations have nice and simple answers to the existence and uniqueness question.

Theorem 2.1.2: Existence and Uniqueness

Suppose p(x), q(x), and f(x) are continuous functions on some interval I containing a with a, b0 and b1 constants. The equation

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

has exactly one solution y(x) defined on the same interval I satisfying the initial conditions

y(a)=b0,y(a)=b1.

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

y(x)=b0cos(kx)+b1ksin(kx)

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

y(x)=b0cosh(kx)+b1ksinh(kx)

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.

Exercise 2.1.2

Suppose we find two different solutions y1 and y2 to the homogeneous equation (???). Can every solution be written (using superposition) in the form y=C1y1+C2y2?

Answer

Answer is affirmative! Provided that y1 and y2 are different enough in the following sense. We will say y1 and y2 are linearly independent if one is not a constant multiple of the other.

Theorem 2.1.3

Let p(x) and q(x) be continuous functions and let y1 and y2 be two linearly independent solutions to the homogeneous equation (???). Then every other solution is of the form

y=C1y1+C2y2.

That is, y=C1y1+C2y2 is the general solution.

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+(y1+p(x)y1+q(x)y1)0v. 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.


This page titled 2.1: Second order linear ODEs is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Jiří Lebl via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?