We know that the integral of,

$$ \int \frac{1}{x} dx = \ln x$$

ignoring any integration constants.

Consider the integral of some more `general' function,

$$ \int \frac{1}{\sqrt{x^2 + y^z +z^2}} dx $$

i.e. in the $y=z=0$ case we recover the original integral ($1/x$)

Now, if I put the second integral into WolframAlpha, it spits out,

$$ \int \frac{1}{\sqrt{x^2 + y^z +z^2}} dx = \ln \left(\sqrt{x^2+y^2+z^2} + x\right)$$.

I naively expected that in the $y=z=0$ case, this answer would revert to $\ln x$, but instead we get $\ln 2x$

What gives?

  • 4
    $\begingroup$ Technically it's $\int\frac{1}{x}dx=\ln|x|+C$, where the locally constant function $C$ can have different values for the cases $x<0,\,x>0$. $\endgroup$
    – J.G.
    Dec 4, 2018 at 18:30

1 Answer 1


Note that

$$\ln 2x=\ln x +\ln 2=\ln x +C$$

  • $\begingroup$ Hmmm ok, but if I wanted to evaluate both over some limits $x=x_1 \rightarrow x_2$, it seems I would still get different answers? $\endgroup$ Dec 4, 2018 at 18:30
  • $\begingroup$ @user1887919 No since the constant cancels out, let try also with some numerical example. $\endgroup$
    – user
    Dec 4, 2018 at 18:31
  • $\begingroup$ @user1887919 You are welcome! Refer also to that related OP, Bye $\endgroup$
    – user
    Dec 4, 2018 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .