Definition · A second-order linear equationAn 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 solutionsIf 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 solutionTry 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.