Problem solving an integral with Wolfram|Alpha?

Hi, today i was solving some math problems with integrals and wolfram alpha (windows 10 app version) gave me an answer that i think is incorrect, could this be possible? Here is the (i think wrong) result: http://s17.postimg.org/hg54ttf4u/Result.jpg
After that i checked on another integral calculator and it gave me this result: http://s22.postimg.org/t1z74y041/Result_2.png which i think its correct.
Can someone tell me if i am right or if i am ignoring something?

Dear Rodrigo,

that’s a kind of problem that comes up from now to then. It is true that the two results look different (and are up to a constant).
If you plot the functions they do look different:

Plot[{1/2 Log[x + 2], Evaluate@Integrate[1/(2 x + 4), x]}, {x, -5, 6}]

They are obviously not identical. I will argue that they are still the same up to an additive constant.

Let’s look at WolframAlpha’s solution the the solution that you got from the other program (and that I got from Mathematica using Integrate); I’ll evaluate the difference for some arbitrary value, here x=0:

(1/2 Log[x + 2] - (Evaluate@Integrate[1/(2 x + 4), x])) /. x -> 0

We get

ScreenShot2016-02-01at23.07.34.png

If we subtract that appropriately we get:

Plot[1/2 (-2 (Log[2]/2 - Log[4]/2) + Log[2 + x] - Log[4 + 2 x]), {x, -15.5, 11.5}]

That’s what we can call a “numerical zero”. We can now do that more rigorously:

FullSimplify[1/2 Log[x + 2] - (Log[2]/2 - Log[4]/2) - (Evaluate@Integrate[1/(2 x + 4), x])]

evaluates to zero. So the two solutions are identical up to an additive constant.

Cheers,

Marco

Thank you very much for the explanation!

Hi,

that is the step by step solution. This also works:

FullSimplify[1/2 Log[x + 2] - (Evaluate@Integrate[1/(2 x + 4), x]), Assumptions -> x > -1]

It gives

-(Log[2]/2)

so a constant which obviously equals

-(-(Log[2]/2) + Log[4]/2)

You can also do:

1/2 Log[x + 2] + Log[2]/2 == (Evaluate@Integrate[1/(2 x + 4), x]) // FullSimplify

or evaluate the derivatives:

FullSimplify[D[1/2 Log[x + 2], x] == D[(Evaluate@Integrate[1/(2 x + 4), x]), x]]

Cheers,

M.