# Evaluating $\int {\frac{1}{2+\sqrt{1-x}+\sqrt{1+x}}}\mathrm dx$

I would like to evaluate: $$\int {\frac{1}{2+\sqrt{1-x}+\sqrt{1+x}}}\mathrm dx$$

$$\frac{1}{2+\sqrt{1-x}+\sqrt{1+x}}=\frac{\sqrt{1-x}+\sqrt{1+x}-2}{2(\sqrt{1-x^2}-1)}$$

The substitution $x \rightarrow \sin(x)$ or $\cos(x)$ can only simplify the denominator, and $x \rightarrow \sqrt{1+x}$ or $\sqrt{1-x}$ is also useless... Can you help me find a useful substitution?

$$x=\cos(2t)$$ $$\int {\frac{1}{2+\sqrt{1-x}+\sqrt{1+x}}}\mathrm dx=-\int {\frac{\sqrt{2}\sin(t)\cos(t)}{\sqrt{2}+\sin(t)+\cos(t)}}\mathrm dt$$

$$u=\tan(t/2)$$

$$-4\sqrt{2}\int \frac{u(1-u^2)}{(1+u^2)^2((\sqrt{2}-1)u^2+2u+1+\sqrt{2})}\mathrm du$$

But now it looks even more complicated... ?

-
Use $1-\cos(x) = 2\sin^2(\frac{x}{2})$ and $1+\cos(x) = 2 \cos^2(\frac{x}{2})$. –  Sasha Sep 24 '11 at 13:38
I tried $u = \sqrt{1-x}$, $u^2 = 1-x$, $2u\;du = -dx$. That reduced it to an expression in which only one radical appeared: $\sqrt{2-u^2}$. Then I tried $v=\sqrt{2-u^2}$, and that transformed it to exactly the same expression with $v$ in place of $u$. I'm not sure I've seen exactly that happen before, although I wouldn't be surprised if I have. –  Michael Hardy Sep 24 '11 at 13:44
It seems that the integral is not really simplified after using $x=\cos(2t)$ and $u=\tan(t/2)$, as I wrote it above (if there is no mistake in my calculus)... What can I do? –  Chon Sep 24 '11 at 16:00
I see you added my answer into your question. You say it "looks more complicated", but it fits right into the standard algorithm involving partial fractions: $\frac{\text{numerator}}{(1+u^2)^2((\sqrt{2}-1)u^2+2u+1+\sqrt{2})} = \frac{Au+B}{1+u^2} + \frac{Cu+D}{(1+u^2)^2}+\frac{Eu+F}{(\sqrt{2}-1)u^2+2u+1+\sqrt{2}}$. –  Michael Hardy Sep 24 '11 at 17:03
...AND: $(\sqrt{2}-1)u^2 + 2u + (\sqrt{2}+1)$ is a perfect square, since it's $\Big( \sqrt{\sqrt{2}-1}\; u + \sqrt{\sqrt{2}+1}\Big)^2$. –  Michael Hardy Sep 24 '11 at 17:06

Would it help you greatly if you transform the integrand to

$$\frac{2-(x+2) \sqrt{1-x}+(x-2) \sqrt{1+x}+2 \sqrt{1-x^2}}{2 x^2}?$$

-
P.S. Repeated rationalization (i.e., the clever use of the difference-of-squares identity) is the key. –  Ｊ. Ｍ. Sep 24 '11 at 13:46

The method posted by Sasha and J.M. (are they both the same thing?) should do it, but just for fun, let's try another. \begin{align} u & = \sqrt{1-x} \\ u^2 & = 1-x \\ 2u\;du & -dx \\ 2-u^2 & = 1+x \end{align} $$\int \frac{dx}{2 + \sqrt{1-x} + \sqrt{1+x}} = \int \frac{-2u\;du}{2+u + \sqrt{2-u^2}}.$$ Now write $$u = \sqrt{2}\sin\theta,\quad du = \sqrt{2}\cos\theta\;d\theta,$$ and we get $$\int\frac{-2\sqrt{2}\sin\theta\cos\theta\;d\theta}{2 + \sqrt{2}\sin\theta+\sqrt{2}\cos\theta} = \int\frac{-2\sin\theta\cos\theta\;d\theta}{\sqrt{2}+\sin\theta+\cos\theta}.$$ Finally, a Weierstrass substitution reduces this to an integral of a rational function, and then one can use partial fractions if necessary.

-

Integral= $$\int\frac{dx}{2+\sqrt{1-x}+\sqrt{1+x}}$$
$$=\int\frac{\sqrt{1-x}-\sqrt{1+x}}{(2+\sqrt{1-x}+\sqrt{1+x})(\sqrt{1-x}-\sqrt{1+x})}dx$$

Substitution:

$z=2+\sqrt{1-x}+\sqrt{1+x}$

$$dz=\frac{\sqrt{1-x}-\sqrt{1+x}}{2\sqrt{1-x^2}}dx$$

$\sqrt{1-x^2}=(1/2)(z^2-4z+2)$

$\sqrt{1-x}-\sqrt{1+x}=\sqrt{4z-z^2}$

Integral=

$$=\int\frac{z^2-4z+2}{z\sqrt{4z-z^2}}dz$$ $$=\int\frac{z-4}{\sqrt{4z-z^2}}dz+\int\frac{2dz}{z\sqrt{4z-z^2}}$$ $$=\int\frac{-(1/2)(-2z+4)}{\sqrt{4z-z^2}}dz-\int\frac{2dz}{\sqrt{4z-z^2}}+\int\frac{2dz}{z\sqrt{4z-z^2}}$$

For the third integral you may use the substitution $z=1/t$

We have,Integral

$$=-\sqrt{4z-z^2}-4\sin^{-1}\frac{\sqrt{z}}{2}-\sqrt{\frac{4-z}{z}}+C$$

Where $z=2+\sqrt{1-x}+\sqrt{1+x}$

-
To get the expression for $\sqrt{1-x^2}$ square both sides of $z-2=\sqrt{1-x}+\sqrt{1+x}$. To get the expression for $\sqrt{x-1}+\sqrt{x+1}$ calculate $(\sqrt{1-x}+\sqrt{1+x})^2-(\sqrt{1-x}-\sqrt{1+x})^2$and simplify –  Anamitra Palit Dec 7 '11 at 8:45
As an alternative method of integration you may multiply the Nr and the Dr by $\cos\theta-\sin\theta$ and proceed with the substitution:$x=\cos2\theta$ –  Anamitra Palit Dec 7 '11 at 9:05

Let $w_+ = \sqrt{1+x}$ and $w_- = \sqrt{1-x}$. Then

$$\begin{eqnarray} \frac{1}{2+w_+ + w_-} &=& \frac{(2 - w_+ + w_- )(2 + w_+ - w_- )(2 - w_+ - w_- )}{(2 + w_+ + w_- )(2 - w_+ + w_- )(2 + w_+ - w_- )(2 - w_+ - w_- )} \\ &=& \frac{4 w_- w_+ - 2 x w_- - 4 w_- +2 x w_+ - 4 w_+ + 4}{4 x^2} \end{eqnarray}$$

This can now be integrate term-wise.

-