Second-order linear differential equations with constant coefficients
Ten second-order linear differential equations with constant coefficients: distinct real roots with an initial value problem, a repeated root and the extra factor of t, complex roots and a decaying oscillation, a spring's angular frequency, period and amplitude, underdamped, critically damped and overdamped springs, undetermined coefficients for a polynomial and an exponential input, the resonant case that needs t times the guess, a sinusoidal input with its steady-state amplitude and lag, superposition of two inputs, and the first-order system x′ = Ax whose eigenvalues are the characteristic roots, with worked solutions and the mistakes of giving a repeated root two copies of one exponential, flipping the sign of the decay, guessing a solution of the homogeneous equation and applying the initial conditions before the particular solution is added.
Before you start
A second-order linear equation with constant coefficients, ,ay′′+by′+cy=f(t), describes anything that has inertia and a restoring force: a mass on a spring, a circuit with an inductor and a capacitor, a pendulum swinging through small angles, and gradient descent with momentum on a quadratic loss. The homogeneous equation, with ,f=0, is solved by exponentials ,ert, and putting one in turns the differential equation into a quadratic for .r. Its two roots decide everything: two real roots give two exponentials, a repeated root needs an extra factor of ,t, and complex roots give oscillations inside an exponential envelope. A forcing term f(t) adds one particular solution, found by guessing its form. The work goes wrong at a handful of places: the repeated root, the sign of the real part of complex roots, a guess that already solves the homogeneous equation, and initial conditions applied too early. These ten problems cover each of them.
Characteristic equation. Putting y=ert into ay′′+by′+cy=0 gives ,ert(ar2+br+c)=0, so r must solve .ar2+br+c=0.
Distinct real roots:r1=r2:.y=c1er1t+c2er2t.
A repeated rootr (when ):b2=4ac):.y=(c1+c2t)ert. The second solution is ,tert, not a second copy of .ert.
Complex roots:r=α±iβ:,y=eαt(c1cosβt+c2sinβt), from Euler's formula .eiβt=cosβt+isinβt. The solution decays if α<0 and grows if .α>0.β is an angular frequency in radians per unit time: the oscillation has period β2π and makes 2πβ cycles per unit time.
Initial conditions. A second-order equation needs two: y(0) and .y′(0). Two constants, two conditions.
Springs.,mx′′+cx′+kx=0, with mass ,m, damping c and stiffness .k. Without damping, x′′+ω2x=0 with ,ω=k/m, and Acosωt+Bsinωt has amplitude .A2+B2. With damping, the discriminant c2−4mk decides: negative is underdamped (it oscillates), zero is critically damped, positive is overdamped.
Undetermined coefficients. For ,ay′′+by′+cy=f(t),:y=yh+yp: the general homogeneous solution plus one particular solution. Guess yp in the form of :f: a polynomial of the same degree for a polynomial, Aekt for ,ekt,Acosωt+Bsinωt for either a cosine or a sine. If the guess solves the homogeneous equation, multiply it by t (by t2 for a repeated root). For a sum of inputs, add the particular solutions.
Constants last. Apply the initial conditions to ,yh+yp, the full solution, never to yh alone.
Problems
·
Solve y′′+y′−6y=0 with y(0)=1 and .y′(0)=7.
·
Solve y′′+6y′+9y=0 with y(0)=2 and .y′(0)=−1.
··
Solve y′′+2y′+5y=0 with y(0)=1 and .y′(0)=3.
··
A 2 kg mass hangs on a spring of stiffness 50 N/m with no damping, so .2x′′+50x=0. It starts 0.1 m from equilibrium with velocity 1 m/s. Find ,x(t), its amplitude, its period and its frequency in cycles per second.
··
A spring with m=1 and k=4 has damping ,c, so .x′′+cx′+4x=0. Classify the motion for ,c=1,c=4 and ,c=5, find the critical value of ,c, and solve the critically damped case with x(0)=1 and .x′(0)=0.
··
Solve y′′+y′−2y=4t2 with y(0)=0 and .y′(0)=0.
··
Find a particular solution of ,y′′−y′−6y=12et, and then of .y′′−y′−6y=10e3t.
···
A damped spring is driven by a periodic force: .x′′+2x′+5x=10cost. Find the steady-state solution, its amplitude and how far it lags the force, and find the driving frequency ω that makes the steady-state amplitude of x′′+2x′+5x=10cosωt largest.
··
Solve y′′+4y=8t+5e−t with y(0)=1 and .y′(0)=0.
···
Write y′′+3y′+2y=0 as a first-order system x′=Ax for .x=(y,y′). Show that the eigenvalues of A are the characteristic roots, find the eigenvectors, and solve with ,y(0)=1,.y′(0)=0.
Answers
y=2e2t−e−3t
y=(2+5t)e−3t
y=e−t(cos2t+2sin2t)
;x=0.1cos5t+0.2sin5t; amplitude ≈0.224 m, period 52π≈1.257 s, frequency 2π5≈0.796 cycles per second
Underdamped for ,c=1, critically damped for ,c=4, overdamped for ;c=5;x=(1+2t)e−2t at c=4
y=38et+31e−2t−2t2−2t−3
yp=−2et for ,12et, and yp=2te3t for 10e3t
,xp=2cost+sint, amplitude ,5, lag ≈0.464 rad; the amplitude is largest at ,ω=3, where it is 2.5
y=2t+e−t−21sin2t
y=2e−t−e−2t
Worked solutions
Problem 1
Solve y′′+y′−6y=0 with y(0)=1 and .y′(0)=7.
,r2+r−6=(r+3)(r−2)=0, so r=2 or r=−3Put y=ert in and divide by ,ert, which is never .0.
y=c1e2t+c2e−3tTwo distinct real roots, two exponentials.
y(0)=c1+c2=1 and y′(0)=2c1−3c2=7Differentiate before substituting .t=0.
,2c1−3(1−c1)=7, so 5c1=10 and ,c1=2,c2=−1Substitute .c2=1−c1.
y=2e2t−e−3tCheck: ,y′′+y′−6y=(8+4−12)e2t+(−9+3+6)e−3t=0, and .y′(0)=4+3=7. The e2t term takes over for large .t.
Problem 2
Solve y′′+6y′+9y=0 with y(0)=2 and .y′(0)=−1.
,r2+6r+9=(r+3)2=0, so r=−3 twiceThe discriminant 36−36 is .0.
y=(c1+c2t)e−3tA repeated root gives e−3t and .te−3t. Check the second: ,(te−3t)′′+6(te−3t)′+9te−3t=(9t−6)+6(1−3t)+9t=0, times .e−3t.
y(0)=c1=2t=0 removes the c2 term.
,y′=(c2−3(c1+c2t))e−3t, so y′(0)=c2−3c1=−1 and c2=5The product rule on .(c1+c2t)e−3t.
y=(2+5t)e−3tCheck: ,y′=(−1−15t)e−3t, so ,y′(0)=−1, and .y′′+6y′+9y=0. One exponential alone could not meet both conditions (Mistake 1).
Problem 3
Solve y′′+2y′+5y=0 with y(0)=1 and .y′(0)=3.
r=2−2±4−20=2−2±4i=−1±2iThe discriminant is ,−16, so the roots are complex.
y=e−t(c1cos2t+c2sin2t)α=−1 is the real part and β=2 the imaginary part.
y(0)=c1=1cos0=1 and .sin0=0.
,y′=e−t((2c2−c1)cos2t−(2c1+c2)sin2t), so y′(0)=2c2−c1=3 and c2=2The product rule, then .t=0.
y=e−t(cos2t+2sin2t)An oscillation with period 22π=π inside the decaying envelope ,5e−t, where .12+22=5.
Problem 4
A 2 kg mass hangs on a spring of stiffness 50 N/m with no damping, so .2x′′+50x=0. It starts 0.1 m from equilibrium with velocity 1 m/s. Find ,x(t), its amplitude, its period and its frequency in cycles per second.
,x′′+25x=0, so r2+25=0 and r=±5iDivide by the mass. ω=k/m=50/2=5 rad/s.
x=Acos5t+Bsin5t:α=0: no decay.
x(0)=A=0.1 and ,x′(0)=5B=1, so B=0.2.x′=−5Asin5t+5Bcos5t.
Amplitude 0.12+0.22=0.05≈0.2236 mAcosωt+Bsinωt=Rcos(ωt−φ) with .R=A2+B2.
;x=0.1cos5t+0.2sin5t; amplitude ≈0.224 m, period 52π≈1.257 s, frequency 2π5≈0.796 cycles per secondCheck: ,x(52π)=0.1, back where it started. The period depends only on m and ,k, not on how far the spring is pulled.
Problem 5
A spring with m=1 and k=4 has damping ,c, so .x′′+cx′+4x=0. Classify the motion for ,c=1,c=4 and ,c=5, find the critical value of ,c, and solve the critically damped case with x(0)=1 and .x′(0)=0.
r2+cr+4=0 has discriminant c2−16Critical damping is where it is :0:.c=2mk=4.
:c=1:,r=2−1±i15, underdampedIt oscillates at β=215≈1.936 rad/s, a little slower than the undamped ,2, inside the envelope .e−t/2.
:c=5:,r2+5r+4=(r+1)(r+4), so ,r=−1,−4, overdampedNo oscillation; the slow mode e−t sets how fast it settles.
:c=4:r=−2 twice, so x=(c1+c2t)e−2t with c1=1 and c2−2c1=0,x′(0)=c2−2c1, as in Problem 2.
Underdamped for ,c=1, critically damped for ,c=4, overdamped for ;c=5;x=(1+2t)e−2t at c=4The critically damped spring settles fastest without overshooting, as :e−2t: more damping (e−t for )c=5) or less (e−t/2 for )c=1) is slower.
Problem 6
Solve y′′+y′−2y=4t2 with y(0)=0 and .y′(0)=0.
,r2+r−2=(r+2)(r−1), so yh=c1et+c2e−2tThe homogeneous equation first.
Guess ,yp=At2+Bt+C, so yp′=2At+B and yp′′=2AA quadratic input needs a full quadratic guess, lower terms included.
2A+(2At+B)−2(At2+Bt+C)=−2At2+(2A−2B)t+(2A+B−2C)=4t2Collect powers of .t.
,−2A=4,,2A−2B=0,2A+B−2C=0 give ,A=−2,,B=−2,C=−3Match the coefficients of ,t2,t and .1.
y=38et+31e−2t−2t2−2t−3The conditions go on the full solution: c1+c2−3=0 and ,c1−2c2−2=0, so ,c1=38,.c2=31. Check: .y(0)=38+31−3=0.
Problem 7
Find a particular solution of ,y′′−y′−6y=12et, and then of .y′′−y′−6y=10e3t.
,r2−r−6=(r−3)(r+2), so yh=c1e3t+c2e−2tFind the homogeneous solutions before guessing.
:yp=Aet:,A(1−1−6)et=−6Aet=12et, so A=−2et is not a homogeneous solution, so the plain guess works.
Ae3t fails for the second input: it gives A(9−3−6)e3t=0e3t already solves the homogeneous equation (Mistake 3).
:yp=Ate3t:,yp′=A(1+3t)e3t,,yp′′=A(6+9t)e3t, and A((6+9t)−(1+3t)−6t)e3t=5Ae3t=10e3tThe t terms cancel, as they must; .A=2.
yp=−2et for ,12et, and yp=2te3t for 10e3tThe general solution of the second is .c1e3t+c2e−2t+2te3t.
Problem 8
A damped spring is driven by a periodic force: .x′′+2x′+5x=10cost. Find the steady-state solution, its amplitude and how far it lags the force, and find the driving frequency ω that makes the steady-state amplitude of x′′+2x′+5x=10cosωt largest.
,xp=Acost+Bsint,,xp′=−Asint+Bcost,xp′′=−Acost−BsintA cosine input needs both a cosine and a sine in the guess.
Cosines: ;−A+2B+5A=4A+2B=10; sines: −B−2A+5B=4B−2A=0Collect cost and sint separately.
,A=2B, so :10B=10:B=1 and A=2The homogeneous part e−t(c1cos2t+c2sin2t) dies out, so xp is what remains.
Amplitude ,22+12=5≈2.236, lag φ=arctan21≈0.464 rad.2cost+sint=5cos(t−φ). The same comes from (5−ω2)2+(2ω)210=2010 at .ω=1.
,xp=2cost+sint, amplitude ,5, lag ≈0.464 rad; the amplitude is largest at ,ω=3, where it is 2.5Minimize :(5−ω2)2+4ω2=ω4−6ω2+25: its derivative in ω2 is ,2ω2−6, zero at ,ω2=3, where it equals 16 and the amplitude is .410. Damping moves the peak below the natural frequency 5 and keeps it finite.
Problem 9
Solve y′′+4y=8t+5e−t with y(0)=1 and .y′(0)=0.
,r2+4=0, so yh=c1cos2t+c2sin2t.r=±2i.
For :8t:y1=at+b gives ,4at+4b=8t, so y1=2t.y1′′=0.
For :5e−t:y2=Ce−t gives ,(1+4)Ce−t=5e−t, so y2=e−tSuperposition: solve for each input separately and add.
y(0)=c1+1=1 and ,y′(0)=2c2+2−1=0, so c1=0 and c2=−21.y′=−2c1sin2t+2c2cos2t+2−e−t.
y=2t+e−t−21sin2tCheck: y′′=e−t+2sin2t and 4y=8t+4e−t−2sin2t add to .8t+5e−t.
Problem 10
Write y′′+3y′+2y=0 as a first-order system x′=Ax for .x=(y,y′). Show that the eigenvalues of A are the characteristic roots, find the eigenvectors, and solve with ,y(0)=1,.y′(0)=0.
A=(0−21−3)The first row says ;(y)′=y′; the second says .(y′)′=−2y−3y′.
det(A−rI)=(−r)(−3−r)+2=r2+3r+2The characteristic polynomial of A is the characteristic polynomial of the equation, so the eigenvalues are r=−1 and .r=−2.
Eigenvectors (1,−1) for r=−1 and (1,−2) for r=−2The first row of (A−rI)v=0 is ,−rv1+v2=0, so :v=(1,r): a solution ert and its derivative .rert.
x=c1e−t(1,−1)+c2e−2t(1,−2) with c1+c2=1 and −c1−2c2=0So c1=2 and .c2=−1.
y=2e−t−e−2tEvery equation here is a 2×2 system in disguise. Gradient descent with momentum on a quadratic of curvature λ behaves like ,y′′+γy′+λy=0, and it converges fastest at the critical damping ,γ=2λ, as in Problem 5.
Where this goes wrong
1. A repeated root written as two copies of one exponential
The rule for distinct roots, one exponential per root, is applied to a double root.
,r2+6r+9=(r+3)2, so r=−3 twiceRight so far: Problem 2.
“Two roots, so two exponentials.”The step that causes the mistake: both roots give the same function.
y=c1e−3t+c2e−3tThis is ,(c1+c2)e−3t, a single constant times one function. y(0)=2 forces ,Ce−3t=2e−3t, whose y′(0) is ,−6, not the required ;−1; no choice fits both conditions. The second solution is ,te−3t, and .y=(2+5t)e−3t.
2. The sign of the real part of complex roots flipped
The roots are complex, and the decay rate is read off the equation's coefficient instead of the roots.
y′′+2y′+5y=0 has r=−1±2iRight so far: Problem 3.
“The coefficient of y′ is ,+2, so .α=+1.”The step that causes the mistake: α is the real part of the root, .−2ab=−1.
y=et(cos2t+sin2t)With y(0)=1 and ,y′(0)=1+2c2=3, this meets both conditions but grows instead of decaying. It solves ;y′′−2y′+5y=0; in the original equation the left side is ,4y′, which is 12 at ,t=0, not .0. A positive damping coefficient always means decay: .y=e−t(cos2t+2sin2t).
3. Guessing a solution of the homogeneous equation
The input is ,e3t, so the guess is ,e3t, as it was for .et.
,y′′−y′−6y=10e3t, with characteristic roots 3 and −2Right so far: Problem 7.
Guess yp=Ae3tThe step that causes the mistake: e3t is already in .yh.
,A(9−3−6)e3t=10e3t, so 0=10 and the equation has no particular solutionThe equation has one; the guess was in the wrong family. Anything that solves the homogeneous equation gives 0 on the left. Multiply the guess by :t:.yp=2te3t.
4. Initial conditions applied before adding the particular solution
The constants are found from ,yh, and the particular solution is added afterward.
yh=c1et+c2e−2t and yp=−2t2−2t−3Right so far: Problem 6.
c1+c2=0 and c1−2c2=0 from y(0)=0 and y′(0)=0The step that causes the mistake: these conditions belong to ,y, not to .yh.
,c1=c2=0, so y=−2t2−2t−3This solves the differential equation but has y(0)=−3 and ,y′(0)=−2, not 0 and .0. Apply both conditions to :yh+yp:c1=38 and .c2=31.
5. The period taken as β/2π
ω=5 rad/s is right, and the period is written down from it the wrong way up.
x=0.1cos5t+0.2sin5tRight so far: Problem 4.
“The period is ω over .2π.”The step that causes the mistake: 2πω is the frequency, in cycles per second.
Period =2π5≈0.796 sAfter 0.796 s the mass is at x≈−0.216 m, near the far end of its swing, not back at .0.1. One full cycle is ,5t=2π, so the period is 52π≈1.257 s; check the units, since ω is in radians per second.