General Solution of y'' + y' + y = 0

Brain Teaser · Easy · Free problem

Find the general (real-valued) solution of the homogeneous linear differential equation $$y'' + y' + y = 0.$$

Hints

  1. For a constant-coefficient linear ODE, try $y = e^{rx}$. Substituting turns the ODE into an algebraic characteristic equation in $r$.
  2. The characteristic equation is $r^2 + r + 1 = 0$. Its discriminant is $1 - 4 = -3 < 0$, so the roots are a complex conjugate pair $\alpha \pm i\beta$.
  3. When the roots are $\alpha \pm i\beta$, the real general solution is $y = e^{\alpha x}\left(c_1\cos\beta x + c_2\sin\beta x\right)$. Read off $\alpha = -1/2$ and $\beta = \sqrt{3}/2$.

Worked Solution

How to Think About It: Because the coefficients are constant, exponentials $e^{rx}$ are the natural trial solutions; the ODE reduces to a quadratic in $r$. Complex roots signal oscillation, and Euler's formula converts complex exponentials into real sines and cosines.

Quick Estimate: Think of $y'' + y' + y = 0$ as a damped oscillator $m\ddot{x} + c\dot{x} + kx = 0$ with $m = c = k = 1$. Damping ratio $\zeta = c/(2\sqrt{mk}) = 1/2 < 1$: underdamped, so expect decaying oscillations with decay rate $\zeta\omega_0 = 1/2$ and damped frequency $\omega_0\sqrt{1 - \zeta^2} = \sqrt{3}/2$.

Formal Solution:

*Step 1 -- Characteristic equation.* Substitute $y = e^{rx}$: $r^2 e^{rx} + r e^{rx} + e^{rx} = 0$, so $$r^{2} + r + 1 = 0 \quad \Longrightarrow \quad r = \frac{-1 \pm \sqrt{1 - 4}}{2} = -\frac{1}{2} \pm \frac{\sqrt{3}}{2}\,i.$$

*Step 2 -- Complex solutions.* The functions $e^{(-1/2 + i\sqrt3/2)x}$ and $e^{(-1/2 - i\sqrt3/2)x}$ are two linearly independent solutions. By Euler's formula, $e^{(-1/2 \pm i\sqrt{3}/2)x} = e^{-x/2}\left(\cos\tfrac{\sqrt3}{2}x \pm i\sin\tfrac{\sqrt3}{2}x\right)$.

*Step 3 -- Real basis.* Taking the sum and difference (divided by $2$ and $2i$) of the two complex solutions gives the real solutions $e^{-x/2}\cos\frac{\sqrt3}{2}x$ and $e^{-x/2}\sin\frac{\sqrt3}{2}x$, which are linearly independent (their Wronskian is $\frac{\sqrt3}{2}e^{-x} \neq 0$). Hence the general solution is $$y(x) = e^{-x/2}\left(c_1 \cos\frac{\sqrt{3}}{2}x + c_2 \sin\frac{\sqrt{3}}{2}x\right), \qquad c_1, c_2 \in \mathbb{R}.$$

*Step 4 -- Verify one basis function.* For $u = e^{-x/2}\cos\beta x$ with $\beta = \sqrt3/2$: $u' = e^{-x/2}(-\tfrac12\cos\beta x - \beta\sin\beta x)$ and $u'' = e^{-x/2}\left((\tfrac14 - \beta^2)\cos\beta x + \beta\sin\beta x\right)$. Then $u'' + u' + u = e^{-x/2}\cos\beta x\,(\tfrac14 - \beta^2 - \tfrac12 + 1) = e^{-x/2}\cos\beta x\,(\tfrac34 - \tfrac34) = 0$. $\checkmark$

Answer: $y = e^{-x/2}\left(c_1\cos\dfrac{\sqrt{3}}{2}x + c_2\sin\dfrac{\sqrt{3}}{2}x\right)$ with arbitrary constants $c_1, c_2$.

Intuition

Constant-coefficient linear ODEs are solved by exponentials, and complex characteristic roots $\alpha \pm i\beta$ mean damped ($\alpha < 0$) oscillation at frequency $\beta$. This is the continuous-time analogue of an AR(2) process with complex roots, which produces mean-reverting cycles; the sign of the real part decides stability, exactly as the modulus of the AR roots does for stationarity.

Open the full interactive solver →