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

## Homework Statement

When I plug in

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

into Mathematica, I get

x - Log[1 + x]

which I've been able to recreate on paper. However, when I plug in

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

I get

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

but on paper I get

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

My question is, where does the constant (1/2) come from? Is it me or Mathematica that's wrong?

Related Calculus and Beyond Homework Help News on Phys.org
Integrate[ x/(1 + x), x] =

x - 1/2 Log[1 + 2 x] + 1/2
or
x - 1/2 Log[1 + 2 x]
or
x - 1/2 Log[1 + 2 x] + c

What's the difference?

Integrate[ x/(1 + x), x] =

x - 1/2 Log[1 + 2 x] + 1/2
or
x - 1/2 Log[1 + 2 x]
or
x - 1/2 Log[1 + 2 x] + c

What's the difference?
5 or 10 points on a test :) depending on how a teacher would grade such mistakes. I'm using Mathematica to check my work and these kinds of things make me wonder if my procedure was off or not.

I remember asking same question like two years ago. I don't think there's any difference. Here's the matlab:

>> syms x;
>> int( 2*x/(1 + 2*x), x)
ans =
x-1/2*log(1+2*x)

But, regardless of what constant you get, in the end there's always "c"
one constant+1/2 = another constant ('c'). The question doesn't have one single answer.

(Also, I don't know why Mathematica is giving 1/2 in the end)

You guys rely WAAAY too much on machines for simple calculations. Back in the native American reservation, I only had small beads for calculus.

Anyway, you are doing it wrong, Mathematica is right.

Int[2x/(1+2x)] dx
Substitute u=1+2x so that dx=du/2
Notice that u-1=2x

Therefore, the integral is
Int[(u-1)/2u] du
which, by splitting it up, is
Int[1/2] du +Int[-1/2u]
which is
u/2 -1/2 ln(u)+c
Don't forget to put it in terms of x

(1+2x)/2-1/2ln(1+2x)+c

This is probably where you messed up you thought (1+2x)/2 is x.
Well, it is actually,

1/2+x-1/2ln(1+2x)+c

Anyway, you are doing it wrong, Mathematica is right.
I wasn't thinking about substitution then but here's how he/me were doing (I think):

=int (2x / (1+2x))
= int (1-1/(1+2x))
=x - 1/2.ln(1+2x) + c

I wouldn't call missing 1/2 wrong if you are using partial fractions (not substitution).

I wasn't thinking about substitution then but here's how he/me were doing (I think):

=int (2x / (1+2x))
= int (1-1/(1+2x))
=x - 1/2.ln(1+2x) + c

I wouldn't call missing 1/2 wrong if you are using partial fractions (not substitution).
*Slaps hand on face* forgot that the +c made the 1/2 completely meaningless. Sorry, that's a habit of mine.

Of course, x - 1/2 Log[1 + 2 x] + c is the simplified solution and your professor may take off some points if you hand in my/Mathematica's answer.