# Calculating $\int \frac{1}{x} \sqrt{\frac{x+a}{x-a}}dx$

I want to evaluate $\int \frac{1}{x} \sqrt{\frac{x+a}{x-a}}dx$.

$x=a\cosh(2t), \int \frac{1}{x} \sqrt{\frac{x+a}{x-a}}dx= \int \frac{2\tanh(2t)}{\tanh(t)}dt= \int \frac{4}{1+\tanh^2(t)}dt$

$u=\tanh(t), \int \frac{4}{1+\tanh^2(t)}dt=2 \int (\frac{1}{1+u^2}+\frac{1}{1-u^2})du=2 \mathrm{artanh}(u)+2\arctan(u)+C=$ $\mathrm{arcosh}(x/a)+2\arctan(\sqrt{\frac{x^2-a^2}{x^2+a^2}})+C$

However, I could not manage to show that the derivative of this function is $\frac{1}{x} \sqrt{\frac{x+a}{x-a}}$.

-

It seems you made a mistake in expressing $u$ in terms of $x$. It's $u=\sqrt{(x-a)/(x+a)}$, so the second term should be $2\arctan\sqrt{(x-a)/(x+a)}$, without the squares. That makes the derivative come out right.

-

After substitutions back into the correct anti-derivative in terms of $u$, I get different result:

$$\cosh^{-1}\left(\frac{x}{a}\right) + 2 \arctan\left( \sqrt{ \frac{x-a}{x+a} }\right) + C$$

Differentiating this, I get $\dfrac{1}{x} \left( \dfrac{x-a}{x+a} \right)^{-\frac12}$.

-
He seems to have gotten the "hyperbolic arc tangent", rather; and that is correct: the derivative of $\mathrm{artanh}(u)$ is $\frac{1}{1-u^2}$, since $\mathrm{artanh}(z) = \frac{1}{2}\ln((1+z)/(1-z))$, i.e., what you have. –  Arturo Magidin Aug 27 '11 at 19:46
@Arturo: Is it really called "hyperbolic arc tangent"? Since the "ar" is for "area", I thought the full name would me "(hyperbolic) area tangent"? –  joriki Aug 27 '11 at 19:49
@joriki: Honestly, I don't know. I don't use these functions much. Like the inverse trig functions, I'm sure they have a lot of names; but I suspect you are far more likely to be right than I am. –  Arturo Magidin Aug 27 '11 at 19:52
$2 \int \frac{1}{1-u^2}du= \log(1+u)-\log(1-u)=2artanh(u)...$ –  Chon Aug 27 '11 at 20:05
Thank you Arturo, I have updated my answer, the issue was in substituting back the chain of transformations from $u$ to $x$. –  Sasha Aug 27 '11 at 20:19