Learn
Lesson · Second-Order Linear Equations · Sines, cosines and two constants

The Second-Order Equation

A second-order equation mentions the rate of the rate of the unknown. The equation y″ + y = 0 is solved by cos t and by sin t, and by every combination C·cos t + D·sin t, which the lab checks by substituting and reading a residual that is exactly zero or is not. Because there are two free constants, one starting value cannot pick out one solution; the starting rate is needed as well.

y″ + y = 0: residual = y″ + y cos t, sin t, C·cos t + D·sin t zero for every t ⟹ a solution y(0) = C, y′(0) = D two constants, so two starting values
A residual that is zero for every t

Core ideas

What this lesson establishes

Three ideas: what the order of an equation counts, what the residual tells you, and why two constants appear and not one.

1

The order is the highest rate in the equation

y′ = 2t is first order; y″ + y = 0 is second order, because it contains y″, the rate of the rate. The equation is linear when y, y′ and y″ each appear alone and to the first power. Both equations in this lesson are linear, and the lab prints the order and says so.

2

A solution has a residual that is zero for every t

Move everything to the left to get y″ + y, substitute the candidate and its two rates, and simplify. The result is the residual. A candidate is a solution when the residual is zero for every t, and not when it is zero at one value, which a wrong candidate can easily be.

3

A solution carries two free constants

If y solves y″ + y = 0 then so does C·y, and if y₁ and y₂ both solve it then so does C·y₁ + D·y₂. With cos and sin that gives a family with two constants. At t = 0 the value is C and the rate is D, so a starting value fixes one of them and a starting rate fixes the other.

The material

Checking solutions of y″ + y = 0

The equation, the residual that decides, a short proof that combinations stay solutions, and why the family needs two starting values.

Definition · A second-order linear equation

An equation in an unknown function y(t) whose highest rate is y″, in which y, y′ and y″ each appear alone and to the first power. A solution is a function that makes it true for every t.

The residual of a candidate is the left side minus the right side after substituting the candidate and its rates. It is zero for every t exactly when the candidate is a solution.

The lab on this page uses the unknown y, and the equation y″ + y = 0. Read y as the position of something that moves along a line, y′ as its velocity and y″ as its acceleration, and the equation says the acceleration is always minus the position. Last lesson's claims already give two solutions: cos″ = −cos and sin″ = −sin.

y = cos t y′ = −sin t y″ = −cos t y″ + y = −cos t + cos t = 0

That residual is exactly zero, and it is zero for every t because the cancellation does not depend on t. The lab does the same with the symbolic rates and prints the residual; it never evaluates the candidate at a number to decide.

Theorem · Combinations of solutions are solutions

If y₁ and y₂ solve y″ + y = 0, then C·y₁ + D·y₂ solves it for every pair of constants C and D.

The rate of a sum is the sum of the rates, and a constant factor comes out of a rate, so (C·y₁ + D·y₂)″ = C·y₁″ + D·y₂″.

Then (C·y₁ + D·y₂)″ + (C·y₁ + D·y₂) = C·(y₁″ + y₁) + D·(y₂″ + y₂) = C·0 + D·0 = 0. Only the form of the equation was used: y″ and y each appear once, to the first power.

□

Example · A candidate that is almost a solution

Try y = t·cos t. The product rule gives y′ = cos t − t·sin t and y″ = −2·sin t − t·cos t.

The residual is y″ + y = −2·sin t, which is zero at t = 0 and at every multiple of π, but not for every t. The lab prints −2·sin(t) and the verdict “Not a solution”.

Why one starting value is not enough

For the family y = C·cos t + D·sin t the starting value is y(0) = C, since cos 0 = 1 and sin 0 = 0. The rate is y′ = −C·sin t + D·cos t, so the starting rate is y′(0) = D. Fixing y(0) = 1 leaves D free: cos t, cos t + sin t and cos t − 5·sin t all start at 1 and are different motions. The starting rate chooses between them.

y = C·cos t + D·sin t y(0) = C y′(0) = D y(0) = 1 and y′(0) = −2 give C = 1, D = −2

The lab's last preset does exactly this. It is given the family with two constants and the starting values, and it solves for them and prints C = 1, D = −2. If the candidate is not linear in C and D, or the equation is not linear, the lab says so and refuses.

Interactive

Checking a solution

Substitute, simplify, compare with zero

Substitute and checkthe residual is simplified symbolically, never evaluated
the candidate, drawnslope field (first order)

Method

Testing a candidate for y″ + y = 0

The same moves for every second-order equation on this course.

1

Write the residual

Put everything on the left: y″ + y. The zero on the right is the value the residual has to equal.

2

Differentiate the candidate twice

Compute y′ and then y″, exactly, with the product rule where t multiplies a sine or cosine.

3

Substitute and simplify

Put the candidate and its two rates into the residual and collect like terms. Do not put in a number for t.

4

Read the residual

If it is 0 for all t, the candidate is a solution. If anything with a t is left, it is not, whatever it does at one value.

5

Count the constants

If the candidate is a family, count the free constants and the starting values you have. You need one starting value for each.

Solutions, residuals and constants

Score 0 / 0

Two candidates, and a pair of starting values

Compare y = t·cos t with y = 3·cos t − 2·sin t as candidates for y″ + y = 0, then fit the family to y(0) = 1, y′(0) = −2.

y = t·cos t y′ = cos t − t·sin t y″ = −2·sin t − t·cos t y″ + y = −2·sin t not zero for every t y = 3·cos t − 2·sin t y″ = −3·cos t + 2·sin t = −y y″ + y = 0 a solution fit: C = y(0) = 1, D = y′(0) = −2

The first residual is −2·sin t, which vanishes at t = 0. That alone proves nothing; the residual has to be zero for every t, and here it is not.

In the second, no t is left after simplifying, so the residual is 0 throughout. The last line shows the starting values reading the constants off directly, because cos is 1 and sin is 0 at t = 0.

Common mistakes

1
Expecting one constant, as in a first-order equationA first-order equation like y′ = k·y has solutions C·e^(kt) with one constant, and one starting value fixes it. For y″ + y = 0 take y = C·cos t and y(0) = 1, so C = 1. Then y′(0) = 0. A start with y′(0) = −2 is not matched by any choice of C: the family has to include D·sin t, and then C = 1, D = −2 fits both starting values.
2
Calling a candidate a solution because its residual vanishes at one tFor y = t·cos t the residual is −2·sin t. It is 0 at t = 0 and −2·sin(1) ≈ −1.68294 at t = 1, where it is rounded. The equation must hold for every t, and the lab's verdict is “Not a solution” for exactly this reason.
3
Testing a candidate by drawing itA plot of t·cos t is a wave that looks a good deal like the cosine, with its amplitude growing. The eye cannot see a residual of −2·sin t. The lab's curve is drawn in floating point to be looked at; the residual is symbolic, and it is the residual that decides.

Check your understanding

✓
Finish when you can check any candidate against a second-order equation by substituting it, and say how many starting values it needs.

You should be able to differentiate a candidate twice, simplify the residual y″ + y, state whether it is zero for every t, and fit the constants C and D of the family from y(0) and y′(0).

Note: Guessing worked here only because the previous lesson supplied cos and sin. “The Characteristic Equation” replaces the guess by one substitution that works for every equation of the form a·y″ + b·y′ + c·y = 0.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.