Skip to main content

Solve y''−y=x² cos x

Short answer

The complementary function is c₁eˣ + c₂e^(-x). The particular integral is ½(1 - x²) cos x + x sin x, giving y = c₁eˣ + c₂e^(-x) + ½(1 - x²) cos x + x sin x.

Solve: d²y/dx² − y = x² cos x.

The equation is (D² − 1)y = x² cos x.

Complementary function

m² − 1 = 0, so m = ±1.

CF = c₁eˣ + c₂e^(−x)

Particular integral

Write x² cos x as the real part of x²e^(ix):

PI = Re [ 1/(D² − 1) · x²e^(ix) ] = Re [ e^(ix) · 1/((D + i)² − 1) · x² ]

(D + i)² − 1 = D² + 2iD − 2 = −2[1 − iD − D²/2], so

PI = Re [ e^(ix) · (−1/2)(1 − iD − D²/2)⁻¹ x² ]

Expand (1 − u)⁻¹ = 1 + u + u² with u = iD + D²/2:

(1 + iD + D²/2 + (iD)² + …) = 1 + iD + (1/2 − 1)D² = 1 + iD − D²/2

Apply to x²: x² + 2ix − 1.

PI = Re [ −(1/2) e^(ix)(x² − 1 + 2ix) ] = −(1/2) [(x² − 1) cos x − 2x sin x] = ½(1 − x²) cos x + x sin x

General solution

y = c₁eˣ + c₂e^(−x) + ½(1 − x²) cos x + x sin x

(Check: with y_p = ½(1 − x²) cos x + x sin x, differentiating twice gives y_p'' − y_p = x² cos x.)

✓ Answer checked by Claude Opus 5.5 (high effort)

All Mathematics I chapter 4 questions →