Skip to content

Forced ODE y'' + y' + y with constant and linear right sides

Question

Find the general solutions of (a) y′′+y′+y=1y''+y'+y=1 and (b) y′′+y′+y=xy''+y'+y=x.

Short answer

(a) y=1+yhy=1+y_h; (b) y=x−1+yhy=x-1+y_h, where yh=e−x/2(c1cos⁡32x+c2sin⁡32x)y_h=e^{-x/2}\left(c_1\cos\tfrac{\sqrt3}{2}x+c_2\sin\tfrac{\sqrt3}{2}x\right). Try a polynomial of the same degree as the forcing: y=Ay=A gives A=1A=1; y=Ax+By=Ax+B gives A=1A=1 and A+B=0A+B=0.

Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 3.5 Ordinary Differential Equations, 'Nonhomogeneous linear ODE', p.48; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question