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:


$$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.

  • $\begingroup$ Since $e^{\text{constant}}=\text{constant}$, $e^{-2x+b}=e^b e^{-2x}= \alpha e^{-2x}$. Using this, $\int x e^{-2x+b} \mathrm{d}x = \alpha \int x e^{-2x} \mathrm{d} x$ = $-\frac{\alpha}4 e^{-2x}(2x+1) + C$ Then, we have $\alpha e^{-2x}y = -\frac{\alpha}{4} e^{-2x}(2x+1)+C$, which can be simplified to $y(x)=-\frac14 (2x+1) +Ce^{-2x}$ , unless I made a mistake somewhere. Then apply initial conditions. Does this make somethings more clear? $\endgroup$
    – Shinaolord
    Commented Oct 13, 2019 at 6:53
  • $\begingroup$ $y(x)=-\frac14 (2x+1) +Ce^{-2x}$ should be $y(x)=-\frac14 (2x+1) +C_1 e^{2x}$, where $C_1=\alpha^{-1} C$ Sorry about the kerfuffle. $\endgroup$
    – Shinaolord
    Commented Oct 13, 2019 at 6:59

2 Answers 2


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.

  • $\begingroup$ Hi thanks for the answer. May I ask, what's the reasoning or justification for the constant being dropped? It just seems to me that $Ce^{-2x}$ and $e^{-2x}$ are two completely different things, and going from the first equation to the second would require some kind of justification. $\endgroup$
    – Sean
    Commented Oct 13, 2019 at 7:37
  • $\begingroup$ Because the factor $e^C$ appears on both sides of the equation, they cancel out. $\endgroup$
    – Quanto
    Commented Oct 13, 2019 at 7:44

You only need one integrating factor for the solution method, thus you can set the first constant to $C=0$ (or select any other convenient value for $C$). Then there is no need to combine or compensate the different constants into one constant for the general solution.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .