Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
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. – Git Gud Mar 16 '14 at 23:33
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. – Ian Coley Mar 16 '14 at 23:34
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. – Giuseppe Negro Mar 16 '14 at 23:38
@GiuseppeNegro I'm very impressed that someone who works on differential equations thinks like this. Respect. – Git Gud Mar 16 '14 at 23:40
I guess, but isn't that just inconsistent? I've sometimes been marked wrong for including a $C$ in the very beginning and keep it all the way through. I just want some explanation for having a $C$ magically appear out of nowhere. – Dylan Mar 16 '14 at 23:41
up vote 1 down vote accepted

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

share|cite|improve this answer
Ah. That makes sense. – Dylan Mar 17 '14 at 0:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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