Home » Blog » Determine the general solution of y′′ + y = e2x cos (3x)

Determine the general solution of y′′ + y = e2x cos (3x)

Determine the general solution of the second-order differential equation

    \[ y'' + y = e^{2x} \cos (3x). \]


The homogeneous equation related to this is an equation of the form y'' + ay' + by = 0 with a = 0 and b = 1. This gives us d = a^2 - 4b = -4 and k = \frac{1}{2} \sqrt{-d} = 1. So, the general solution of the homogeneous equation y'' + y = 0 is given by

    \begin{align*}  y &= e^{-\frac{ax}{2}} (c_1 \cos (kx) + c_2 \sin (kx)) \\  &= c_1 \cos x + c_2 \sin x. \end{align*}

Then we know that v_1(x) = \cos x and v_2(x) = \sin x are particular solutions of the homogeneous equation (taking c_1 = 1, \ c_2 = 0 and c_1 = 0, \ c_2 = 1, respectively). The Wronskian of v_1 and v_2 is given by

    \begin{align*}  W(x) &= v_1 v_2' - v_1' v_2 \\  &= \cos^2x + \sin^2 x \\  &= 1. \end{align*}

Thus, a particular solution of the non-homogeneous equation is given by (from Theorem 8.9)

    \begin{align*}  y_1 &= t_1 v_1 + t_2 v_2 \\  t_1 &= -\int v_2 \frac{R}{W} \, dx \\  &= - \int \sin x \cdot (e^{2x} \cos (3x)) \, dx \\  &= -\frac{1}{40} e^{2x} \cos x (5 \cos (2x) - 4 \cos (4x) - 5 \sin (2x) + 2 \sin (4x)) \\ t_2 &= \int v_1 \frac{R}{W} \, dx \\  &= \int \cos x \cdot (e^{2x} \cos (3x)) \, dx \\  &= \frac{1}{40} e^{2x} (\sin x)(5 \cos (2x) + 2 \cos (4x) + 5 \sin (2x) + 4 \sin (4x)). \end{align*}

This implies

    \begin{align*}  y_1 &= -\frac{1}{40} e^{2x} \big( \cos^2 x (5 \cos (2x) - 4 \cos (4x) - 5 \sin (2x) + 2 \sin (4x)) \\  & \qquad - \sin^2 x (5 \cos (2x) + 2 \cos (4x) + 5 \sin (2x) + 4 \sin (4x)) \big) \\[9pt]  &= -\frac{1}{40} e^{2x} \big( \cos (3x) - 3 \sin (3x) \big). \end{align*}

Therefore, the general solution is

    \[ y = c_1 + c_2 e^{3x} - \frac{1}{5} e^{2x} (\cos x + 3 \sin x). \]

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):