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

Why does

 Integrate[(4 x)/(2 x + 1), x]


 1 + 2 x - Log[1 + 2 x]

Notice the extra 1. The answer should be 2 x - Log[1 + 2 x] plus the constant of integration. But Integrate never gives a constant of integration.

 Integrate[4 x, x]
 (2 x^2*)

Actually, here is the answer by Rubi:

 Int[(4 x)/(2 x + 1), x]
 (* 2 x - Log[1 + 2 x] *)

And by Maple

Mathematica graphics

and by Wolfram Alpha

Mathematica graphics

I restarted the kernel, restarted Mathematica. Same answer. Using V 9.01 on windows 7.

Mathematica graphics

Any idea what is going on? Is this a known feature/issue? One can of course argue that the answer is not wrong, since the constant of integration can be any value, but it is strange that it shows up here only, and with a specific value.

share|improve this question
It is very odd indeed and all of the examples ( also show no constant. Even more odd, WA shows the constant. – Amzoti Oct 12 '13 at 23:43
I don't think it's a feature or an issue. Constants happen. This one looks like the result of the method of substitution. Try integrating Log[2 x + 1] or 1/(4 x + 2). The last one has a constant in it if you apply a rule of logarithms. :) I guess they don't worry about post-processing out constants that might be considered "obviously" extraneous by humans. – Michael E2 Oct 13 '13 at 1:29
I'm running 9.0.0 and I'm not seeing the extra 1. Are you using an older version? – Chip Hurst Oct 13 '13 at 3:17
@RiemannZeta There is a newer version... – R. M. Oct 13 '13 at 5:48
up vote 3 down vote accepted

As MichaelE2 observed, this result is not technically wrong and perhaps can be understood by substitution:

Simplify[1/2 Integrate[(2 u - 2)/u, u] /. u -> (2 x + 1)]

where $u=2x+1$ and the 1/2 is $\frac{dx}{du}=1/2$, i.e. $\int \frac{4x}{2x+1}dx =\int \frac{2u-2}{u}\frac{dx}{du} du$

share|improve this answer
I agree with this. As a matter of fact, there is no "answer without a constant" to an integration. The proposed solution 2x+Log[2x+1] is just a solution for a particular value of the integration constant. I find (2x+1)+Log[2x+1] a more elegant answer, as a matter of fact. – Peltio Oct 13 '13 at 13:35

The Indefinite Integrals tutorial says:

Integrate simply gives you an expression with the required derivative.

share|improve this answer

Considering it over range of power of x,

   e = (4 x)/(2 x + 1) /. x -> x^n
Integrate[e, x] /. n -> 1 // Simplify

2 x - Log[1 + 2 x]

share|improve this answer

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.