When to include the constant of integration when finding the integrating factor

integrationordinary differential equations

I'm currently studying ODE's with Advanced Engineering Mathematics 10e (Kreyszig) and had a question regarding the constant of integration when finding the integrating factor.

I'm currently solving an exercise problem in the section where they explain using the integrating factor to solve nonhomogeneous linear ODEs. More specifically:

Solve:

$$y' – 2y – x = 0$$

My approach is as follows:

Since $y' – 2y = x$, we can first find the integrating factor by:

$$
Fy' – 2Fy = xF$$

where $-2F = F'$. From here it follows that:

$$
\begin{align}
\frac{F'}{F} & = -2 \\
\left( \ln(F) \right)' & = -2 \\
\ln(F) & = -2x + C \\
F & = e^{-2x + C}
\end{align}
$$

Plugging this back into the equation above:

$$
\begin{align}
e^{-2x + C}y' -2e^{-2x + C}y & = xe^{-2x + C} \\
\left( e^{-2x + C}y \right)' & = xe^{-2x + C} \\
e^{-2x + C} y & = -\frac{x}{2}e^{-2x + C_1}+C_2
\end{align}
$$

And this is where I get stuck. The reason why I'm confused is because I'm not sure how to deal with the constants of integration that I've introduced into the entire process after multiple integration operations.

Is my overall approach correct? And if so, how might I go about dealing with the constants of integration? Thanks.

Best Answer

The constant $C$ drops out in the process, that is, the factor $e^C$ cancels out since it is on both sides of

$$\left( e^{-2x + C}y \right)' = xe^{-2x + C}$$

The equation simplifies to

$$\left( e^{-2x}y \right)' = xe^{-2x}$$

Then, integrate,

$$ e^{-2x}y = \int xe^{-2x} dx+ C_1= -\frac{x}{2}e^{-2x} —\frac{1}{4}e^{-2x}+C_1$$

You end up with only one constant, as expected.