Calculus · real student question

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

Question

Find the general solution of

y+y=0y''+y=0

Step-by-step solution

  1. Substitute the exponential trial solution y=erxy=e^{rx}. Then y=r2erxy''=r^2e^{rx}, and the equation becomes

    r2erx+erx=erx(r2+1)=0r^2e^{rx}+e^{rx}=e^{rx}\left(r^2+1\right)=0

  2. Read off the characteristic equation. Since erx0e^{rx}\neq 0 for all real xx:

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

  3. Write the real general solution. With α=0\alpha=0 and β=1\beta=1 in the template eαx(C1cosβx+C2sinβx)e^{\alpha x}\left(C_1\cos\beta x+C_2\sin\beta x\right):

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

    Two arbitrary constants is exactly right for a second-order equation — they are fixed by two initial conditions such as y(0)y(0) and y(0)y'(0).

  4. Verify both basis solutions. For y=cosxy=\cos x: y=cosxy''=-\cos x, so y+y=0y''+y=0 \checkmark. For y=sinxy=\sin x: y=sinxy''=-\sin x, again 00 \checkmark.

  5. Compare with y+4y=0y''+4y=0. That equation gives r=±2ir=\pm 2i and solutions in cos2x,sin2x\cos 2x,\sin 2x: the coefficient of yy is the square of the angular frequency, so y+ω2y=0y''+\omega^2y=0 oscillates at ω\omega. Here ω=1\omega=1 and the period is 2π2\pi.

Answer

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

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