Theorem 3.1. If y1 and y2 are solutions of the homogeneous equation y′′+py′+qy=0 Then c1y1+c2y2 is also a solution (superposition principle).
Theorem 3.2 (Wronskian Criterion). Two solutions y1,y2 of the homogeneous equation form a fundamental set (i.e., span all solutions) if and only if their Wronskian is non-zero:
W(y1,y2)(x)=y1y1′y2y2′=0
Abel’s identity states that W(x)=W(x0)e−∫x0xp(t)dt.
Theorem 3.3. The general solution of y′′+py′+qy=g is y=yh+ypWhere yh is the General solution of the homogeneous equation and yp is any particular solution.
3.2 Homogeneous Equations with Constant Coefficients
For y′′+ay′+by=0 with a,b constants, try y=erx:
r2+ar+b=0
Case 1: Two distinct real roots r1=r2.yh=c1er1x+c2er2x.
Case 2: Repeated root r.yh=c1erx+c2xerx.
Case 3: Complex conjugate roots r=α±iβ.yh=eαx(c1cos(βx)+c2sin(βx)).
For equations y′′+ay′+by=g(x) where g(x) is a polynomial, exponential, sine, cosine, or Products of these, guess the form of yp and solve for coefficients.
g(x)
Guess for yp
Pn(x)
Anxn+⋯+A0
eax
Aeax
sin(bx) or cos(bx)
Asin(bx)+Bcos(bx)
eaxPn(x)
eax(Anxn+⋯+A0)
eaxsin(bx) or eaxcos(bx)
eax(Asin(bx)+Bcos(bx))
Rule. If any term of the guess is a solution of the homogeneous equation, multiply by x (or x2 if already multiplied by x).
The amplitude grows linearly with t --- this is resonance. Physically, the system absorbs energy From the periodic forcing at its natural frequency, causing unbounded oscillations.
Worked Example. Solve y′′+9y=6cos(3t), y(0)=0, y′(0)=0.
Theorem 3.4 (Variation of Parameters). For y′′+p(x)y′+q(x)y=g(x)Let y1,y2 be a Fundamental set of solutions of the homogeneous equation. Then a particular solution is
yp=−y1∫Wy2gdx+y2∫Wy1gdx
Where W=W(y1,y2)=y1y2′−y2y1′.
Proof. Seek yp=u1(x)y1(x)+u2(x)y2(x). Impose the constraint u1′y1+u2′y2=0. Then yp′=u1y1′+u2y2′ and yp′′=u1′y1′+u1y1′′+u2′y2′+u2y2′′. Substituting into the ODE: (u1′y1′+u2′y2′)+u1(y1′′+py1′+qy1)+u2(y2′′+py2′+qy2)=g. Since y1,y2 satisfy the homogeneous equation, this reduces to u1′y1′+u2′y2′=g. Together With u1′y1+u2′y2=0Solving gives the formulas above. ■
3.11 Worked Example: Variation of Parameters
Problem. Solve y′′+y=tanx using variation of parameters.
Theorem 3.5. Given one solution y1(x) of y′′+p(x)y′+q(x)y=0A second linearly Independent solution is obtained by setting y2=y1∫y12e−∫p(x)dxdx.
Proof. Seek y2=v(x)y1(x). Then y2′=v′y1+vy1′ and y2′′=v′′y1+2v′y1′+vy1′′. Substituting into the ODE:
v′′y1+2v′y1′+vy1′′+p(v′y1+vy1′)+qvy1=0
v′′y1+v′(2y1′+py1)+v(y1′′+py1′+qy1)=0
Since y1 satisfies the ODE, the coefficient of v vanishes:
v′′y1+v′(2y1′+py1)=0
Let w=v′. Then w′y1+w(2y1′+py1)=0A separable first-order ODE:
ww′=−y12y1′+py1=−2y1y1′−p
lnw=−2lny1−∫pdx⟹w=y12e−∫pdx
Since w=v′We obtain the result. ■
Worked Example. Given that y1=ex solves y′′−2y′+y=0Find a second solution.
Solution
Solution. Here p(x)=−2So e−∫pdx=e2x.
y2=ex∫e2xe2xdx=ex∫1dx=xex.
This gives yh=c1ex+c2xexConsistent with the repeated-root case (r=1 with Multiplicity 2). ■
3.13 Euler-Cauchy Equations
An Euler-Cauchy (equidimensional) equation has the form
x2y′′+axy′+by=0,x>0
The substitution y=xr gives the characteristic equation
r(r−1)+ar+b=r2+(a−1)r+b=0
Case 1: Two distinct real roots r1=r2.yh=c1xr1+c2xr2.
Case 2: Repeated root r.yh=c1xr+c2xrlnx.
Case 3: Complex roots r=α±iβ.yh=xα(c1cos(βlnx)+c2sin(βlnx)).
3.14 Worked Example: Euler-Cauchy Equation
Problem. Solve x2y′′−3xy′+4y=0.
Solution
Solution. Try y=xr: r(r−1)−3r+4=r2−4r+4=(r−2)2=0.
Repeated root r=2.
y=c1x2+c2x2lnx. ■
Worked Example. Solve x2y′′+xy′+y=0.
Solution
Solution.r(r−1)+r+1=r2+1=0. Roots r=±i.
Here α=0, β=1.
y=c1cos(lnx)+c2sin(lnx). ■
3.15 Higher-Order Linear ODEs
For y(n)+an−1y(n−1)+⋯+a1y′+a0y=0:
Characteristic equation rn+an−1rn−1+⋯+a0=0.
For root r of multiplicity m: include erx,xerx,…,xm−1erx.
For complex roots α±iβ of multiplicity m: include eαxxkcos(βx) and eαxxksin(βx) for k=0,…,m−1.
3.16 Spring-Mass-Damper Systems
A mass m on a spring with spring constant k and damping coefficient cSubject to external force F(t)Satisfies
mx′′+cx′+kx=F(t)
Dividing by m and setting ω0=k/m, γ=c/(2m):
x′′+2γx′+ω02x=mF(t)
The homogeneous solution depends on the discriminant γ2−ω02:
Condition
Type
Homogeneous Solution
γ2<ω02
Underdamped
e−γt(c1cos(ωdt)+c2sin(ωdt)), ωd=ω02−γ2
γ2=ω02
Critical
e−γt(c1+c2t)
γ2>ω02
Overdamped
c1er1t+c2er2t, r1,2=−γ±γ2−ω02
Damped Harmonic Oscillator
The underdamped oscillation e−γtcos(ωdt) (blue) decays inside the envelope ±e−γt (green/red). Adjust sliders c (damping γ) and w (damped frequency ωd) to explore different regimes.
3.17 Common Pitfalls for Second-Order ODEs
:::caution Common Pitfall When using undetermined coefficients, always check whether your guess Overlaps with the homogeneous solution. For y′′−4y=e2xGuessing yp=Ae2x fails Because e2x satisfies the homogeneous equation. You must use yp=Axe2x instead. :::
:::caution Common Pitfall For Euler-Cauchy equations, the substitution y=xr only works for x>0. For x<0Substitute x=−et or use y=(−x)r. :::
:::caution Common Pitfall Variation of parameters always works but can lead to difficult integrals. If the forcing term g(x) is a polynomial, exponential, sine, or cosine (or products of these), Prefer undetermined coefficients --- it is much faster.
3.18 Abel’s Identity (Proof)
Theorem 3.6 (Abel’s Identity). If y1,y2 are solutions of y′′+p(x)y′+q(x)y=0 Then their Wronskian satisfies
W(x)=W(x0)e−∫x0xp(t)dt
Proof. Since y1,y2 satisfy the ODE:
y1′′=−py1′−qy1 and y2′′=−py2′−qy2.
W′=y1y2′′+y1′y2′−y1′′y2−y1′y2′
=y1(−py2′−qy2)−(−py1′−qy1)y2
=−p(y1y2′−y1′y2)=−pW.
So W′+pW=0Giving W=Ce−∫pdxAnd evaluating at x0 gives the result. ■
Corollary.W(x) is either identically zero or never zero.
3.19 Worked Example: Variation of Parameters (Second Example)
Problem. Solve y′′−4y=xex using variation of parameters.