Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

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

The following two calculations should give the same result. After all, integration is a linear operation.

enter image description here

I have pasted the code below in case you want to play with it.

Integrate[Integrate[v[x], x] - 
     Integrate[Integrate[v[x], x] * u'[x], x]/u[x], x]

Integrate[Integrate[v[x], x], x] - 
   Integrate[Integrate[Integrate[v[x], x] * u'[x], x]/u[x], x]
share|improve this question
if i plug in example functions for v,u I get the same result (not zero) – george2079 Nov 15 '13 at 20:52
Should I tag this question as "bug"? – Hector Nov 16 '13 at 14:36
@Hector No, every integration is defined up to an additive constant. Therefore answer is defined up to a nontrivial function. – ybeltukov Nov 16 '13 at 14:48
@Hector Indeed. Most likely Mathematica think that Integrate[v[x], x] is a constant (i.e. bug). – ybeltukov Nov 16 '13 at 15:45
Simpler example illustrating @ybeltukov's comment: Integrate[Integrate[Integrate[v[x], x] * Derivative[1][u][x], x] - Integrate[v[x], x] * Integrate[Derivative[1][u][x], x], x] evaluates to zero. Note that it does not evaluate to zero if the outside Integrate is removed. – Michael E2 Nov 17 '13 at 15:44

Your Answer


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

Browse other questions tagged or ask your own question.