What is the integral
$$\int_{0}^{a}\sqrt{{\tanh}(a)-{\tanh}(x)}\;dx$$
I have tried various substitutions but couldn't get the answer.
The substitution $x = {\tanh}^{-1}y$ has simplified into rational function in y but I couldn't proceed further.
I got
$$\int_{0}^{\tanh(a)}\frac{1}{\sqrt{\tanh(a)-y}}\frac{1}{1-y^{2}} \; .$$
$$I=\int_0^a \sqrt{\tanh a-\tanh x}dx\overset{\tanh x=y}=\int_0^{\tanh a} \sqrt{\tanh a-y}\ \frac{dy}{1-y^2}$$ Let us denote $\tanh a=n$ for now. And our first goal must be to get rid of the square root, thus a substitution of $n-y =t^2$ would fit great. $$I=\int_0^n \frac{\sqrt{n-y}}{1-y^2}dy=\int^0_{\sqrt n} \frac{t}{1-(n-t^2)^2}(-2t\,)dt=\int_0^{\sqrt n} \frac{2t^2}{1-(n-t^2)^2}dt$$ $$=\int_0^\sqrt n \frac{1+n}{1+n-t^2}dt-\int_0^\sqrt n \frac{1-n}{1-n+t^2}dt$$ $$=\frac{1+n}{\sqrt{1+n}}\operatorname{arctanh}\left(\frac{t}{\sqrt{1+n}}\right)\bigg|_0^\sqrt n-\frac{1-n}{\sqrt{1-n}}\arctan\left(\frac{t}{\sqrt{1-n}}\right)\bigg|_0^\sqrt n$$ $$={\sqrt{1+\tanh a}}\cdot \operatorname{arctanh}\left(\sqrt{\frac{{\tanh a}}{1+\tanh a}}\right)-{\sqrt{1-\tanh a}}\cdot \arctan\left(\sqrt{\frac{{\tanh a}}{1-\tanh a}}\right)$$