# Two different results for the same integral

1. Mar 12, 2007

### fredgarvin22

hello everybody

i hope i make this clear and to the point. there is an integral that is bothering me. i will express it as the combination of 2 integration formulas that you can look up, under logarithmic functions (http://en.wikipedia.org/wiki/List_of_integrals_of_logarithmic_functions) [Broken]. here are two identities from that list:

$$\int \ln(cx) dx = x\ln(cx) - x$$
and
$$\int \ln(ax + b) dx = x\ln(ax + b) - x + (b/a)\ln(ax + b)$$

I have an equation(it actually comes from a famous paper in physics) that basically represents the difference between the two. To make things simpler, a = c = 1 in my equation.
So I have:

(1) $$\int \ln(x + b) dx - \int \ln(x) dx$$

using the identities I have:

$$x\ln(x + b) - x + (b)\ln(x + b) - x\ln(x) + x$$
$$x\ln(x + b) + (b)\ln(x + b) - x\ln(x)$$

$$(x + b)\ln(x + b) - x\ln(x)$$

so that's that. Now let me do it slightly differently(and don't ask why):

I will factor out the 'b' from the equation first (1):

(2) $$\int \ln[(x/b + 1)*(b)] dx - \int \ln[(x/b)*b] dx$$

$$\int \ln[(x/b + 1) + ln(b)] dx - \int \ln[(x/b) + ln(b)] dx$$

$$\int \ln(x/b + 1) dx - \int \ln(x/b)dx + \int ln(b)dx - \int ln(b)dx] dx$$

$$\int \ln(x/b + 1) dx - \int \ln(x/b) dx$$

using the same identities

$$x\ln(x/b + 1) - x + b\ln(x/b + 1) - x\ln(x/b) + x$$
$$x\ln(x/b + 1) + b\ln(x/b + 1) - x\ln(x/b)$$
$$(x + b)\ln(x/b + 1) - x\ln(x/b)$$

this is now a different result from approach (1). You can't, unless I'm wrong, recover it again by resubstituting the factor b in again.

My question: why does this simple factoring out, change the answer here?

Last edited by a moderator: May 2, 2017
2. Mar 12, 2007

### mathman

Constant of integration: (x+b)ln(b)-xln(b) is constant [= (b)ln(b)]. Add it to your second result, you will get the first result.

3. Mar 12, 2007

### fredgarvin22

that's very clever mathman - how did you come up with that?

Last edited: Mar 12, 2007
4. Mar 13, 2007

### Gib Z

He just noticed what the difference between the 2 solutions were. If it ever happens, and its a constant, you know what you forgot.

5. Mar 13, 2007

### fredgarvin22

you are correct, the difference between the solutions is indeed b*ln(b). to me that means that in order for the constant of integration(which could any constant) to be equivilent in both equations, I need to either add or subtract this constant, which ever is appropriate, to the result.

I'm not sure what I have learned here, except that the answers are off only by a constant(b*(ln(b)). perhaps if i think about it for a while it will sink in. i'd still like to see mathman elaborate just a little more on his answer, because my math is so rusty and terrible.

in any case thank both of you guys for taking the time to answer.

6. Mar 13, 2007

### arildno

Why should they be equivalent?
Why should one technique that gives you one anti-derivative give you the same anti-derivative as using some other?

DEFINITE integrals are unique, anti-derivatives are not.

7. Mar 13, 2007

### fredgarvin22

i expected them to be equivelant because the (1) and (2) look equivelant to me. if you did this trick on just one of the identities alone, then the answer comes out the same. it seems to come up almost by accident because 2 terms from the two identities cancel each other out. and evidently this is buried somewhere in the integration constant.

8. Mar 13, 2007

### mathman

My starting point was the observation that the integral of ln(b) is (x)ln(b).
Since we are dealing with indefinite integrals, the constant is arbitrary, (b)ln(b) is perfectly acceptable.