When integrating by parts, at what point does the constant come in?

The rule has always been like this:

$$ \int u\,dv = uv - \int v\,du $$

The explanation is that this the "reversal" of the product rule:

$$ d(uv) = u\,dv + v\,du $$

But if that is the case, shouldn't a $C$ appear when you integrate both sides?

$$ uv = \int u\,dv + \int v\,du + C \quad ? $$

I've been told to just ignore the $C$ because it will appear in the final integral anyway, like this:

$$ \begin{align*} \int xe^x\,dx &= xe^x - \int e^x\, dx \\ &= xe^x - e^x + C \end{align*} $$

Fine. But what happens when integrating by parts results in the exact same integral as the original?

Like this, first no $C$:

$$ \begin{align*} \int e^x \sin x \, dx &= e^x \sin x - \int e^x \cos x \, dx \\ &= e^x \sin x - \left( e^x \cos x + \int e^x \sin x \, dx \right) \end{align*}$$

Then out of nowhere, a $C$ appears:

$$ \begin{align} 2\int e^x \sin x \, dx &= e^x \sin x - e^x \cos x + C \\ \int e^x \sin x \, dx &= \frac{1}{2} e^x \sin x - \frac{1}{2} e^x \cos x + C \end{align} $$

We know the final result has to contain a $C$, but where does it come from? No integral is being evaluated here, all we did was move the integral from the right to the left.

This is one thing that I think is not being properly taught.

  • 1
    $\begingroup$ In principle every time you integrate, you should add a constant, but if you ignore it and just add it in the end, the two final resulting expressions will be equivalent. $\endgroup$ – Git Gud Mar 16 '14 at 23:33
  • $\begingroup$ If you get a $C_1$ on the right and a $C_2$ on the left, you may combine them into one constant term. As such, it suffices to shove in a constant term at the very end. $\endgroup$ – Ian Coley Mar 16 '14 at 23:34
  • 4
    $\begingroup$ I agree with you that this thing is not properly taught. I am more radical, though, in that I think that it is the very symbol of "indefinite integral" that is flawed and confusing. It should be removed and kept only as a "guilt practice", like treating $dy/dx$ as a real fraction and things like that. $\endgroup$ – Giuseppe Negro Mar 16 '14 at 23:38
  • $\begingroup$ @GiuseppeNegro I'm very impressed that someone who works on differential equations thinks like this. Respect. $\endgroup$ – Git Gud Mar 16 '14 at 23:40
  • 2
    $\begingroup$ Possible duplicate of Constants of integration in integration by parts $\endgroup$ – Arnaud D. Sep 19 '18 at 9:26

Here's one way to think about it: we reach this step: $$ \int e^x \sin x \, dx = e^x \sin x - e^x \cos x - \int e^x \sin x \, dx $$ And for our next step, we'd like to add $\int e^x \sin x \, dx$ on both sides, so we do. $$ \int e^x \sin x \, dx + \int e^x \sin x \, dx = e^x \sin x - e^x \cos x - \int e^x \sin x \, dx + \int e^x \sin x \, dx \\ \int [e^x \sin x + e^x \sin x] \, dx = e^x \sin x - e^x \cos x + \int [e^x \sin x - e^x \sin x] \, dx \\ \int 2[e^x \sin x] \, dx = e^x \sin x - e^x \cos x + \int 0\, dx \\ 2\int e^x \sin x \, dx = e^x \sin x - e^x \cos x + C $$ The intuition is that when we take the antiderivative twice in the same equation, we don't guarantee that the result is the same each time. So, the equation $$ \int e^x \sin x \, dx = e^x \sin x - e^x \cos x - \int e^x \sin x \, dx $$ Is really something to the effect of $$ F(x) + C_1 = e^x \sin x - e^x \cos x - [F(x) + C_2] $$ Where $F$ is some antiderivative of $e^x \sin x$.

  • $\begingroup$ Ah. That makes sense. $\endgroup$ – Dylan Mar 17 '14 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.