Home » Blog » Find the general solution of y′′ + 6y′ + 9y = f(x) for given conditions

Find the general solution of y′′ + 6y′ + 9y = f(x) for given conditions

Find the general solution of the second-order differential equation

    \[ y'' + 6y' + 9 = f(x), \]

where f(x) = 1 for 1 \leq x \leq 2, and f(x) = 0 for all other x.


If x < 1 or x > 2, then we have the equation

    \[ y'' + 6y' + 9 = 0. \]

This is of the form y''  + ay' + by = 0 with a = 6 and b= 9. Therefore, d = a^2 - 4b = 0 so the solutions are given by

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

If 1 \leq x \leq 2, then we have the equation

    \[ y'' + 6y' + 9 = 1. \]

A particular solution to this equation is given by y_1 = \frac{1}{9} (since y_1' = y_1'' = 0 in this case). Therefore, all solutions are of the form

    \[ y = (a+bx)e^{-3x} + \frac{1}{9}. \]

3 comments

  1. Anonymous says:

    For a given c1 and c2, aren’t there additional constraints on a and b?

    For the derivative of y at x = 1 and x= 2 to exist, y needs to be continuous at those points.

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