Problem 15
Easy Constant Coefficients

Find the general solution of y'' + y' + x = 0

Find the general solution of $y'' + y' + x = 0$.

Explanation of Method

Reduce the order via $p = y'$, solve the resulting linear ODE, then integrate.

Step 1: Substitution

Let $p = y'$, so $p' = y''$. The equation becomes: \[p' + p = -x. \tag{1}\]

This is a first-order linear ODE in $p(x)$.

Step 2: Integrating factor

\[ \mu = e^{\displaystyle\int 1\,dx} = e^x. \]

Step 3: Multiply by the integrating factor

\[ \frac{d}{dx}\left[e^x p\right] = -x e^x. \]

Step 4: First integration

Integrate both sides using integration by parts with $u = -x$, $dv = e^x\,dx$: \[e^x p = \int -x e^x\,dx = -x e^x + e^x + C_1 = (1-x)e^x + C_1.\]

Thus: \[p = y' = (1-x) + C_1 e^{-x}. \tag{2}\]

Step 5: Second integration

\[ y = \int\left(1 - x + C_1 e^{-x}\right)dx = x - \frac{x^2}{2} - C_1 e^{-x} + C_2. \]

Step 6: General solution

Relabelling $-C_1$ as $C_1$: where $C_1$ and $C_2$ are arbitrary constants.

Step 7: Verification

Differentiate: $y' = 1 - x - C_1 e^{-x},\qquad y'' = -1 + C_1 e^{-x}.$

Check $y'' + y' + x$: $(-1 + C_1 e^{-x}) + (1 - x - C_1 e^{-x}) + x = 0.$ $\checkmark$


Result

Final answer:

\[\boxed{\,y = x - \frac{x^2}{2} + C_1 e^{-x} + C_2\,}\]