[Notes on Diffy Qs home] [PDF version] [Buy cheap paperback version]

[next] [prev] [prev-tail] [tail] [up]

2.1 Second order linear ODEs

Note: less than 1 lecture, first part of §3.1 in [EP], parts of §3.1 and §3.2 in [BD]

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),
(2.1)

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.2)

We have already seen some second order linear homogeneous equations.

y′′ + k2y = 0 Two solutions are: y1 = cos(kx), y2 = sin (kx ). ′′ 2 kx -kx y - k y = 0 Two solutions are: y1 = e , y2 = e .

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 (2.2). Then

y(x) = C 1y1(x) + C2y2(x),

also solves (2.2) for arbitrary constants C 1 and C 2 .

That is, we can add solutions together and multiply them by constants to obtain new and different solutions. We call the expression C 1y1 + C 2y2 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 = C y + C y 1 1 2 2 . Then

 ′′ ′ ′′ ′ y + py + qy = (C 1y1 + C 2y2) + p(C1y1 + C2y2) + q(C1y1 + C 2y2) = C y′′+ C y′′+ C py′ + C py′ + C qy + C qy 1 1′′ 2 2′ 1 1 2′′ 2 ′ 1 1 2 2 = C1(y1 + py 1 + qy1) + C 2(y2 + py2 + qy2) = C1 ⋅ 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 is, but a function 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 (C y + C y ) = C Ly + C Ly 1 1 22 1 1 2 2 . The proof above becomes

Ly = L(C 1y1 + C2y2) = C1Ly1 + C2Ly2 = C 1 ⋅ 0 + C2 ⋅ 0 = 0.

Two different solutions to the second equation y′′ - k2y = 0 are y1 = cosh (kx) and y2 = sinh(kx) . Let us remind ourselves of the definition, cosh x = ex+e-x 2 and sinh x = ex-e-x- 2 . 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 = 1 sinh0 = 0 d d ---coshx = sinhx ---sin hx = coshx dx 2 2 dx cosh x - sin h x = 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,q,f are continuous functions on some interval I , a is a number in I , and a,b ,b 0 1 are 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

 b1- y(x ) = b0co s(kx) + k sin(kx).

The equation y′′ - k2y = 0 with y(0) = b 0 and y′(0) = b 1 has the solution

y(x) = b0cosh(kx) + b1-sinh(kx). k

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.

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

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

Theorem 2.1.3. Let p, q be continuous functions. Let y1 and y2 be two linearly independent solutions to the homogeneous equation (2.2). Then every other solution is of the form

y = C y + C y . 1 1 2 2

That is, y = C 1y1 + C 2y2 is the general solution.

For example, we found the solutions y1 = sinx and y2 = cos x for the equation y′′ + y = 0 . It is not hard to see that sine and cosine are not constant multiples of each other. If sin x = Aco sx 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 = C 1cosx + C2 sin x

is the general solution to y′′ + y = 0 .

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

2.1.1 Exercises

Exercise 2.1.2: Show that  x y = e and  2x y = e are linearly independent.

Exercise 2.1.3: Take  ′′ y + 5y = 10x + 5 . Find (guess!) a solution.

Exercise 2.1.4: Prove the superposition principle for nonhomogeneous equations. Suppose that y 1 is a solution to Ly = f(x) 1 and y 2 is a solution to Ly = g(x) 2 (same linear operator L ). Show that y = y1 + y2 solves Ly = f(x) + g(x) .

Exercise 2.1.5: For the equation  2′′ ′ x y - xy = 0 , find two solutions, show that they are linearly independent and find the general solution. Hint: Try  r y = x .

Equations of the form ax2y′′ + bxy′ + cy = 0 are called Euler’s equations or Cauchy-Euler equations. They are solved by trying y = xr and solving for r (assume that x ≥ 0 for simplicity).

Exercise 2.1.6: Suppose that (b - a)2 - 4ac > 0 . a) Find a formula for the general solution of ax2y′′ + bxy′ + cy = 0 . Hint: Try y = xr and find a formula for r . b) What happens when (b - a)2 - 4ac = 0 or (b - a)2 - 4ac < 0 ?

We will revisit the case when  2 (b - a) - 4ac < 0 later.

Exercise 2.1.7: Same equation as in Exercise 2.1.6. Suppose (b - a)2 - 4ac = 0 . Find a formula for the general solution of  2 ′′ ′ ax y + bxy + cy = 0 . Hint: Try  r y = x lnx for the second solution.

If you have one solution to a second order linear homogeneous equation you can find another one. This is the reduction of order method.

Exercise 2.1.8 (reduction of order): Suppose y1 is a solution to y′′ + p(x)y′ + q(x)y = 0 . Show that

 ∫ ∫ e- p(x)dx y2(x) = y1(x) (----)2-dx y1(x)

is also a solution.

Note: If you wish to come up with the formula for reduction of order yourself, start by trying y2(x) = y1(x)v(x) . Then plug y2 into the equation, use the fact that y1 is a solution, substitute w = v′ , and you have a first order linear equation in w . Solve for w and then for v . When solving for w , make sure to include a constant of integration. Let us solve some famous equations using the method.

Exercise 2.1.9 (Chebyshev’s equation of order 1): Take (1 - x2)y′′ - xy′ + y = 0 . a) Show that y = x is a solution. b) Use reduction of order to find a second linearly independent solution. c) Write down the general solution.

Exercise 2.1.10 (Hermite’s equation of order 2): Take  ′′ ′ y - 2xy + 4y = 0 . a) Show that  2 y = 1 - 2x is a solution. b) Use reduction of order to find a second linearly independent solution. c) Write down the general solution.

Exercise 2.1.101: Are sin (x) and  x e linearly independent? Justify.

Exercise 2.1.102: Are ex and ex+2 linearly independent? Justify.

Exercise 2.1.103: Guess a solution to y′′ + y′ + y = 5 .

Exercise 2.1.104: Find the general solution to  ′′ ′ xy + y = 0 . Hint: Notice that it is a first order ODE in  ′ y .