University Mathematics — Year 1 · Bachelor Year 1
5Linear Differential Equations
First met in the High School volume, differential equations are treated here with full proofs and in greater generality: first-order linear equations with variable coefficients (solved completely by the variation-of-constants method) and second-order linear equations with constant coefficients, the model for oscillations. Both cases display the same structure: general solution one particular solution general solution of the homogeneous equation.
5.1 First-order linear equations
Definition 5.1
Let be an interval and (or ) be continuous. The equation
in the unknown differentiable function (or ), is a first-order linear differential equation. The equation is its homogeneous equation.
Theorem 5.2 (Solving the homogeneous equation)
Let be a primitive of on (it exists: Chapter 15). The solutions of on are exactly the functions
Proof. These functions are solutions: . Conversely, let solve and set . Then
so is constant on the interval , say : . (Note the logic: no solution is lost, because every solution has been written in the announced form.) ∎
Example 5.3 (A homogeneous equation with variable coefficient)
Solve on . A primitive of is , so the solutions are
Two readings. Every solution is periodic (period ) and never vanishes unless — the sign of is the sign of forever, since an exponential cannot cross zero. And the solution through is : exactly one curve of the family through each initial point, the one-dimensional picture of Theorem 5.4 (2).
Theorem 5.4 (Variation of constants; Cauchy problem)
With the notation above:
The solutions of on are exactly
where is fixed. Equivalently: general solution of plus one particular solution of .
- For every and , the Cauchy problem “ and ” has exactly one solution on .
Proof. (1) Following the method named variation of constants, look for solutions of the form with differentiable — no generality is lost, since every function on can be so written (). Substituting,
so solves if and only if , if and only if for some constant (two primitives of the same continuous function on an interval differ by a constant).
(2) In the formula, : the condition determines uniquely. ∎
Example 5.5
Solve on . Here , , . Homogeneous solutions: . Variation of constants: , so , and
With the initial condition : . Check: .
Example 5.6 (Guessing beats integrating)
Solve on . Variation of constants works (, , ), but observing that the constant solves the equation () is faster. With the homogeneous solutions :
Every solution converges to extremely fast as : the constant particular solution is an equilibrium that all solutions join. The insight: before launching the general method, spend ten seconds looking for an obvious particular solution (constant, monomial, multiple of the right-hand side); the structure theorem then finishes the job.
Remark 5.7 (Intervals matter)
The theorem lives on an interval where and are continuous. For on , the solutions are on and on with independent constants: there is no reason for a single formula to glue across the singularity at .
Example 5.8 (A complex right-hand side, two real answers)
Solve and in one stroke. Work in with the right-hand side : trying gives , so
Since the equation has real coefficients, real and imaginary parts split: solves , and solves (check the first: derivative , minus the function, gives ). One complex line replaced two runs of variation of constants — the same economy that Method 5.13 systematizes for second order, and a recurring dividend of Chapter 3.
5.2 Second-order linear equations with constant coefficients
Definition 5.9
Let and continuous. The equation
is a second-order linear equation with constant coefficients; is its homogeneous equation, and its characteristic polynomial.
Theorem 5.10 (Homogeneous solutions)
Let be the discriminant of . The real solutions of on are:
- if , with the two real roots: ;
- if , with the double root: ;
- if , with roots (): ;
in each case with running over .
Proof. First observe that for , solves if and only if (substitute: ). This is why exponentials are the natural first guess: differentiation acts on as multiplication by the number , so the differential equation becomes the numerical equation — the whole analytic problem is compressed into finding the roots of one quadratic.
The key step is a change of unknown that reduces the order. Let be a (possibly complex) root of and write , which loses no generality. Then
so becomes the first-order equation for .
Case : choose ; then (since ). By Theorem 5.2, for some constant ; integrating on , with , and therefore . When , the roots are and the complex solutions are with . Which of these are real-valued? Since , the conjugate of is , and for all forces (the two exponentials are linearly independent: evaluate at two points, or compare at after dividing by ). Writing with real:
and conversely every such function is a solution (real part of a complex solution of a real equation): the real solution space is as announced.
Case : , , so : and . ∎
Example 5.11 (A Cauchy problem, start to finish)
Solve with , . The characteristic polynomial has the real roots and : general solution . The two conditions give the linear system
so , :
Check: ; has ; and . Note the shape of the answer: near the slow mode dominates; near the fast mode does. Reading solutions as superpositions of modes with different decay or growth rates is the profitable habit — it is how the transient/steady-state split of the weekend problem is organized.
Theorem 5.12 (Structure and Cauchy problem)
- If is one particular solution of , the solutions of are exactly , running over the solutions of .
- (Superposition) If solves and solves , then solves the equation with right-hand side .
- For all and , the Cauchy problem “, , ” has exactly one solution on . (Existence granted a particular solution; uniqueness in full.)
Proof. (1) solves iff solves , by linearity of . (2) is the same linearity.
(3) By (1) it suffices to prove that the constants can always be adjusted, uniquely, to any data . Translating the variable, assume . In case (1) of Theorem 5.10, gives
a linear system in whose determinant is ; solving it explicitly, and : exactly one solution. In case (2), and : the system is triangular with determinant , solved by , . In case (3), and : determinant , solved by , . In each case the map is a linear bijection — the language of Chapter 20 will compress this case check into one sentence. ∎
Method 5.13 (Particular solution for )
When the right-hand side is with a polynomial and (this covers polynomials, exponentials, and via complex or superposition, and ): look for a particular solution of the form
with a polynomial of the same degree as , whose coefficients are found by substitution and identification. For (or ), solve with right-hand side and take the real (resp. imaginary) part.
Example 5.14 (Superposition in action)
Solve on . Homogeneous: , roots , so . Split the right-hand side and treat each piece by the method box. Piece : here is a simple root of , so try : then , giving . Piece : is not a root; the constant works. By superposition (Theorem 5.12 (2)):
Note how the two pieces demanded different shapes ( versus ): the multiplicity test is applied to each exponent separately, which is the whole point of splitting the right-hand side before guessing.
Example 5.15 (The multiplicity rule at work)
Solve on . The right-hand side is with , and is a simple root of : so , and the correct guess is , one degree higher than . Substituting:
and identification with gives , : . General solution: . Had we guessed (ignoring the multiplicity), substitution would give , a constant — no choice of can match , and the failure is structural: constants already solve the homogeneous equation, so they are invisible to the left-hand side. The factor exists precisely to climb out of the homogeneous solution space.
Remark 5.16 (The thirty-second insurance policy)
Every solved equation in this chapter ends with a substitution check, and this is not decorative. A differential-equation computation chains many small steps (a primitive, a product rule, two constants), and a single sign error propagates invisibly; substituting the final formula back into the equation catches essentially all of them at the cost of one differentiation. Cultivate the reflex in three layers: check the particular solution alone (the homogeneous part cancels anyway), check the initial conditions on the full solution, and when a parameter is present, check a degenerate value (does the formula for general reproduce the known answer at ?). The habit costs half a minute; it converts “probably right” into “verified”.
Remark 5.17 (Common pitfalls)
- Normalize first. The formulas assume the equation reads — coefficient on . For , divide by (on an interval avoiding ) before identifying and , as in Exercise 5.2.
- One constant per dimension, fixed at the end. The general first-order solution carries one constant, the second-order one two; initial conditions are imposed on the complete solution , never on alone — imposing them before adding is the most frequent structural error.
- Mind the multiplicity. A particular-solution guess that solves the homogeneous equation is invisible to the left-hand side; the factor of Method 5.13 is not optional (Example 5.15).
- Intervals are part of the answer. Solutions live on intervals where the coefficients are continuous; gluing across a singularity can create spurious constants (Exercise 5.12) or destroy uniqueness. “Solve on ” means two independent problems.
Example 5.18 (Off-resonance forcing)
Solve on . Natural frequency , forcing frequency : since is not a root of , the multiplicity is and a plain sinusoid suffices. Trying (no cosine needed: the equation has no term, and regenerates ):
so and the general solution is
Every solution stays bounded: a superposition of two oscillations at the frequencies (forced) and (natural). Compare with the next example, where forcing at the natural frequency changes the answer’s very shape.
Example 5.19 (A forced oscillation)
Solve , , .
Homogeneous: , roots : .
Particular: right-hand side with a simple root of : try (). Then , which equals for . So and .
General solution: . Conditions: ; , so . Answer: — an oscillation whose amplitude grows linearly: the resonance phenomenon, caused by forcing the system at its natural frequency.
Remark 5.20 (Interlude: linearity is a geometry)
Look back at the shape of every solution set in this chapter: a special solution plus a space of homogeneous solutions with one free constant (first order) or two (second order). The chapters on linear algebra (Chapters 18, 19 and 20) will supply the exact vocabulary: the map is linear, its homogeneous solutions form the kernel of , a vector space whose dimension equals the order of the equation — that is the honest content of “one constant per order” — and the solution set of is an affine subspace, a translate of the kernel. Even the Cauchy map of Theorem 5.12 is a linear bijection between two planes, i.e. an invertible system (Chapter 21). Nothing in this chapter will need to be redone — it will only need to be renamed, and the renaming is the best possible warm-up for linear algebra: every abstract definition there has already earned its living here.
Remark 5.21 (Where this chapter is used)
The structure theorem — solutions of form “a particular solution plus the solutions of ” — is the first appearance of a pattern that Chapters 18 and 20 will name: the solution set of is the kernel of the linear map , and the solution set of is an affine translate of it. The characteristic polynomial reappears as the characteristic polynomial of a matrix in Chapter 21: a second-order equation is a first-order system in disguise, a viewpoint the Year 2 volume systematizes. The integrals demanded by variation of constants are supplied by Chapter 15, and the weekend problem below — the driven damped oscillator — is the model case for every oscillation question in the sciences, from circuits to suspension bridges.
5.3 Exercises
Exercise 5.1 ★
Solve on : ; then the Cauchy problem .
Solution
Solution of Exercise 5.1.
Homogeneous: . Particular: try ( is not a root of ): , . General solution: . With : , , so .
Exercise 5.2 ★
Solve on : (put the equation in the normalized form first).
Solution
Solution of Exercise 5.2.
On , divide by : . Here , : homogeneous solutions . Variation of constants: , so and
Check: .
Exercise 5.3 ★
Solve on , giving the real general solution: ; ; .
Solution
Solution of Exercise 5.3.
: roots and ; .
: double root ; .
: roots ; .
Exercise 5.4 ★
Solve on , then the Cauchy problem , .
Solution
Solution of Exercise 5.4.
Homogeneous: roots , . Particular with polynomial right-hand side ( not a root): ; substituting, gives , , : . General solution .
Cauchy: and : , . So .
Exercise 5.5 ★★
Solve on : .
Solution
Solution of Exercise 5.5.
, (valid: on the interval), : homogeneous solutions . Variation of constants: , so and
Check: and ; their sum is , as required.
Exercise 5.6 ★★
Solve on . (Mind the multiplicity: is a root of the characteristic polynomial?)
Solution
Solution of Exercise 5.6.
: is a simple root (). Try . With ,
Identify with : and , so , . General solution:
Exercise 5.7 ★★
Solve on (superposition; treat each right-hand side separately).
Solution
Solution of Exercise 5.7.
Homogeneous: .
Right-hand side ( not a root): with : .
Right-hand side , simple root of : try ; then , equal to for . So and .
By superposition:
Exercise 5.8 ★★
A cup of coffee at temperature C sits in a room at C. Newton’s law of cooling states with . Solve for , and given that the coffee is at C after minutes, find when it reaches C.
Solution
Solution of Exercise 5.8.
The equation has constant particular solution and homogeneous solutions : , and gives :
: , so . Then requires , i.e.
Exercise 5.9 ★★★
(Damped oscillator) For , consider .
- Solve for , , and .
- Show that for every solution tends to at , and that for the nonzero solutions do not.
- For , show that the zeros of a nonzero solution are regularly spaced, with gap .
Solution
Solution of Exercise 5.9.
- , . For : roots , so with . For : double root , . For : real roots , both , and .
- For : . For : (exponential beats polynomial, Proposition 4.6). For : both exponentials decay since (indeed ). For : has constant amplitude unless .
- Write with . The zeros of are those of (the factor never vanishes): , an arithmetic progression with gap .
Exercise 5.10 ★★★
Find all functions , twice differentiable, such that
with and not constant. Hint: fix , differentiate twice with respect to at ; show and for some constant ; then solve according to the sign of and check which solutions satisfy the functional equation.
Solution
Solution of Exercise 5.10.
Set : , and gives . Fix and differentiate the equation twice with respect to :
Setting : , that is
Case : ; gives . Plugging into the functional equation and using the addition formulas (Proposition 4.18), the equation forces (compare the coefficients of or evaluate at ): , which does satisfy .
Case : similarly (), which satisfies the equation.
Case : affine with : ; the equation forces , excluded ( not constant).
Conclusion: the solutions are and , .
Exercise 5.11 ★★
(Euler equation) Solve on . Hint: set , i.e. substitute , and show that satisfies a linear equation with constant coefficients.
Solution
Solution of Exercise 5.11.
Set , so that for . Then
and substituting into the equation:
Characteristic polynomial : double root , so and, back in the variable :
Exercise 5.12 ★★★
Consider the equation on the whole real line, in the unknown differentiable function .
- Solve on and on .
- Show that for any constants , the function equal to for and to for is differentiable on and solves the equation everywhere.
- Conclude that the solution set on is a two-parameter family, and explain why this does not contradict the uniqueness in Theorem 5.4.
Solution
Solution of Exercise 5.12.
- In normalized form on each interval: , so the solutions are on and on , with independent constants (Theorem 5.2).
- Let for and for . On each open half-line is differentiable with . At : the difference quotients or tend to , so exists, and the equation at reads : satisfied. So solves the equation on all of .
- The solutions on are exactly these glued functions: a two-parameter family for a first-order equation. There is no contradiction with Theorem 5.4, whose hypotheses fail here: written as , the coefficient is not continuous at — indeed not defined — so is not an interval on which the theorem applies. The singularity at disconnects the two half-lines, and the value is forced, carrying no information across. Every Cauchy datum at determines the solution only on the half-line containing .
5.4 Problem: The driven damped oscillator
Problem 5.1
One equation governs a mass on a spring in a viscous medium, the charge in an RLC circuit, and a building swaying in the wind:
with the damping, the natural frequency, and , the amplitude and frequency of the forcing. This problem extracts its complete behavior: the decay of transients, the unique periodic steady state, the resonance curve and its sharpness (the quality factor), the beats of the undamped case, and the energy balance that sustains the oscillation. Unless stated otherwise, (underdamped regime) and we write .
Part I — The free oscillator. Here .
- Solve the homogeneous equation for , and for . (The regimes were treated in Exercise 5.9; quote them.)
- Show that for every , all solutions of tend to at — in all three regimes.
- Define the energy along a solution of . Show , and deduce (without solving anything) that the Cauchy problem “, ” has only the zero solution, for every .
- For , write the nonzero solution as and let be the pseudo-period. Show that : each swing is the previous one shrunk by the constant factor , (the logarithmic decrement). Compute for , .
- Define the quality factor . Show that after the time (one amplitude -folding), the oscillator has completed pseudo-periods, which for weak damping () is approximately : the quality factor counts, up to , the oscillations survived before the amplitude decays by .
Part II — The steady state. Now and .
Look for a particular solution as the real part of with (Method 5.13). Show that this works with
Deduce the steady state in amplitude–phase form: with
- Interpret the two extreme regimes: compute the limits of and as (quasi-static response , phase ) and as (, phase : the mass moves opposite to a too-fast forcing).
- Show that every solution of is plus a solution of , hence converges to the steady state as , whatever the initial conditions: after the transient dies, the oscillator has no memory of how it started.
- Show that is the only periodic solution of .
Work one Cauchy problem to the end: for with , show that the solution is
and identify transient and steady parts.
Part III — The resonance curve. Study of on .
Setting and , show: if , then attains a strict maximum at the resonance frequency , with
- Show that : at resonance, the forcing is amplified by (essentially) the quality factor.
- Prove that the velocity amplitude is maximal exactly at (not at ), and that the phase there is : at the velocity is exactly in phase with the force.
- (Bandwidth) Solve exactly, where , and deduce that the two frequencies where satisfy ; conclude that for weak damping the bandwidth is , i.e. : sharp resonance peaks are high- systems.
- Numerical portrait for , (), : compute , , the static response , and the approximate bandwidth.
- Show that if , then is strictly decreasing on : heavily damped systems have no resonance peak at all.
Part IV — No damping: beats and resonance. Here .
- For , find the general solution of .
Solve the Cauchy problem and transform the answer into the product form
- For close to , read the product as a fast oscillation at frequency modulated by a slow envelope at frequency : the beats. Give the period of the envelope and the maximal amplitude, and note how both blow up as .
Fix and let in question 19’s formula: show the limit is
and check directly that solves the resonant equation with (compare Example 5.19): resonance is the limit of ever-slower, ever-larger beats.
- Contrast the two fates of resonance: linear growth without damping, versus saturation at with weak damping. In one sentence: what physical mechanism converts the first into the second?
Part V — Energy balance and synthesis.
- In the steady state of Part II, compute the average over one period of (a) the power injected by the forcing, , and (b) the power dissipated by the damping, . Show both averages equal : the forcing feeds in exactly what the damping burns — this is why the steady state is steady.
- Where exactly did the problem use: (i) the structure theorem Theorem 5.12; (ii) the complex exponential method; (iii) a real-variable function study in the style of Chapter 4? One sentence each.
- Synthesis: describe the full behavior map of — free versus forced, damped versus undamped, the role of as the single dimensionless dial tuning peak height, bandwidth and transient lifetime — and mention where the story continues: first-order systems (Chapter 21 and the Year 2 volume) and the decomposition of a general periodic forcing into sinusoids (Fourier series, in the Year 3 volume), for which this problem’s sinusoidal case is the fundamental building block.
Solution
Solution of Problem 5.1.
1. , for : roots , so by Theorem 5.10
For : . The critical () and overdamped () regimes are those of Exercise 5.9 (after rescaling time): , resp. combinations of with .
2. Underdamped: . Critical: since exponentials beat polynomials (Proposition 4.6). Overdamped: because ; both exponentials decay.
3. Along a solution of , using :
If then ; is nonnegative and nonincreasing, so on , forcing there; for , run the same argument on , which solves the equation with damping but still has and with ; nonnegative, nondecreasing and zero at the right end of means zero throughout. So on — an energy proof of uniqueness, valid for all .
4. . The shrink factor per pseudo-period is with . For , : , so : each swing keeps of its amplitude.
5. The amplitude factor is , which decays by over . That interval contains pseudo-periods. For , and this is . A guitar string rings for about a hundred periods; a door damper does not complete one.
6. Substituting into the left-hand side gives , which equals exactly for (the denominator is nonzero: its imaginary part is ). Since the coefficients are real, the real part solves the equation with right-hand side .
7. Write with and (the imaginary part is positive), so . Then and
8. As : , so and with : . The mass follows the force quasi-statically, displaced by force/stiffness. As : , so , and (the complex number goes to the second quadrant with argument ): the mass barely moves, and in opposition of phase — inertia dominates.
9. By Theorem 5.12 (1), every solution is with solving ; by question 2, , so : all solutions converge to the same steady state. The initial conditions only shape the transient.
10. If is a periodic solution, is a periodic solution of which tends to at ; a periodic function with limit is identically (its values on one period repeat forever, so every value is a limit of a subsequence tending to ). Hence .
11. Here , , , : , so
Homogeneous: roots of are : . Conditions: gives ; differentiating, gives . Hence
the transient dying like .
12. Expanding, with and
If , then is an admissible squared frequency: has a strict minimum there, so has a strict maximum at , with .
13. , so
For weak damping the correction factor is close to : resonance multiplies the static displacement by essentially .
14. with . Its derivative has the sign of , positive for and negative beyond: strict maximum exactly at , for every damping. There blows up with : , and is exactly in phase with the force: optimal power transfer.
15. , giving
Then , and for both : , so . Measuring a resonance peak’s width measures its quality factor.
16. ; ; ; static response ; bandwidth . A tall thin spike of height over a plateau of height .
17. If then and for all : increases strictly on , so decreases strictly from : the response is largest at zero frequency and there is no peak.
18. is not a root of (as ), so Method 5.13 with gives (substitute and check: times the cosine). General solution:
19. forces , and forces :
by the product formula applied with , .
20. For near , the second sine oscillates at the fast frequency , while the first is a slow envelope of frequency : the amplitude of the fast oscillation waxes and wanes with envelope period (two beats per envelope period), reaching maxima . As , the beats become both slower (period ) and taller (amplitude ).
21. Fix . As :
while : the limit is . Direct check: with , has , so , with and — for this is exactly Example 5.19. Resonance is the degeneration of beats: the first swell of the envelope, stretched to infinite length.
22. Without damping the resonant amplitude grows linearly and without bound; with damping the growth saturates at . The mechanism: dissipation removes energy at a rate growing with the amplitude (question 23), so the build-up stops exactly when the damping burns energy as fast as the forcing supplies it.
23. With , over a period the averages and give:
and expanding :
Since , this is : injected and dissipated powers balance exactly — the defining property of a steady regime.
24. (i) The structure theorem split every solution into steady state plus transient (questions 9–11) and reduced uniqueness to the homogeneous problem. (ii) The complex method turned the search for a particular solution into one division of complex numbers (question 6), with amplitude and phase read off a modulus and an argument. (iii) The resonance curve is a pure function study — a quadratic in , its minimum, its level sets — in the style of Chapter 4 (questions 12–17).
25. Free and damped: decaying pseudo-oscillations, lifetime , about swings. Forced and damped: transients die, and a unique sinusoidal steady state survives at the forcing frequency, with amplitude peaking near (height static, width ) and phase sweeping from to through at . Free and undamped: perpetual oscillation. Forced and undamped: beats, degenerating into linearly growing resonance at exact tuning. One dimensionless number, , tunes everything — peak height, bandwidth, and transient lifetime are three readings of the same dial. The sequel: rewriting as a first-order system opens the matrix methods of Chapter 21 and the Year 2 volume, and decomposing an arbitrary periodic forcing into sinusoids (Fourier series, Year 3 volume) makes this problem’s single-frequency analysis the universal building block: solve for each frequency, superpose.