Calculus · real student question

Solve the differential equation y'' + y = 12.

Question

Solve the differential equation

y+y=12y''+y=12

Step-by-step solution

  1. Split the problem in two. For a linear equation with constant coefficients, the general solution is y=yh+ypy=y_h+y_p: the general solution of the homogeneous equation plus any one particular solution of the full equation. Both parts are needed — omitting ypy_p or dropping the arbitrary constants both give wrong answers.

  2. Solve the homogeneous equation. Setting the right side to zero and trying y=erxy=e^{rx} gives the characteristic equation

    r2+1=0r=±ir^2+1=0\qquad\Longrightarrow\qquad r=\pm i

    A purely imaginary conjugate pair ±iβ\pm i\beta corresponds to oscillation with no decay, so

    yh=C1cosx+C2sinxy_h=C_1\cos x+C_2\sin x

  3. Choose a trial particular solution. The right side is the constant 1212, so try a constant, yp=Ay_p=A. Since a constant has zero derivatives, yp=0y_p''=0 and substitution gives

    0+A=12A=120+A=12\qquad\Longrightarrow\qquad A=12

    so yp=12y_p=12. (This works because r=0r=0 is not a root of the characteristic equation — otherwise the trial would have needed an extra factor of xx.)

  4. Assemble the general solution.

    y(x)=C1cosx+C2sinx+12y(x)=C_1\cos x+C_2\sin x+12

  5. Interpret the answer. The solution oscillates with period 2π2\pi and amplitude C12+C22\sqrt{C_1^2+C_2^2} about the equilibrium level y=12y=12. That 1212 is the steady state the constant forcing imposes: the homogeneous part supplies the wobble, the particular part sets the centre line.

  6. Verify by substitution. With y=C1cosx+C2sinx+12y=C_1\cos x+C_2\sin x+12: y=C1cosxC2sinxy''=-C_1\cos x-C_2\sin x, so

    y+y=(C1cosxC2sinx)+(C1cosx+C2sinx+12)=12 y''+y=\left(-C_1\cos x-C_2\sin x\right)+\left(C_1\cos x+C_2\sin x+12\right)=12\ \checkmark

    Numerically with C1=1.3C_1=1.3, C2=0.7C_2=-0.7, a central second difference of step 10410^{-4} gives y+y=12.000y''+y=12.000 at x=0.2, 1.5, 1.1x=0.2,\ 1.5,\ -1.1 ✓.

Answer

y(x)=C1cosx+C2sinx+12y(x)=C_1\cos x+C_2\sin x+12

Need to solve a different problem like this? Open the solver →