# 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

$$\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. – J. M. isn't a mathematician 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 tangent half-angle 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.


$(1)$ let $x=\cos(2t)\mid dx=-2\sin(2t)$
$(2)$ let $u=\pi/8-t/2\iff t=\pi/4-2u\mid dt=-2du$
$(3)$ use integration by parts
$(4)$ use \begin{align}\sin(4u)\tan(u)&=2\sin(2u)\cos(2u)\tan(u)\\&=4\sin^2(u)\cos(2u)\\&=2\cos(2u)(1-\cos(2u))\\&=2\cos(2u)-2\cos^2(2u)\\&=2\cos(2u)-\cos(4u)-1\end{align}

Just to give a complete answer using the method of the square. Using the easily proved equation

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

one can get

\begin{align*} \int_{-1}^{1} \frac{\mathrm{d}x}{\sqrt{1+x} + \sqrt{1-x} + 2} &= \int_{-1}^{1} \frac{\mathrm{d}x}{\sqrt{2\left (1+\sqrt{1-x^2} \right )}+2} \\ &\!\!\!\!\!\overset{x = \sin u}{=\! =\! =\! =\! =\!} \int_{-\pi/2}^{\pi/2} \frac{\cos u}{\sqrt{2\left ( 1+\cos u \right )}+2}\, \mathrm{d}u\\ &=\int_{-\pi/2}^{\pi/2} \frac{\cos u}{\sqrt{4 \cos^2 \frac{u}{2}}+2} \, \mathrm{d}u \\ &= \int_{-\pi/2}^{\pi/2} \frac{\cos u}{2 \cos \frac{u}{2} + 2} \, \mathrm{d} u \\ &= \frac{1}{2} \int_{-\pi/2}^{\pi/2} \frac{\cos u}{1+ \cos \frac{u}{2}} \, \mathrm{d}u \\ &= \frac{1}{4} \int_{-\pi/2}^{\pi/2} \frac{\cos u}{\cos^2 \frac{u}{4}} \, \mathrm{d}u \\ &= {\require{cancel}\cancelto{0}{\frac{1}{4} \left [ 4 \tan \frac{u}{4} \cos u \right ]_{-\pi/2}^{\pi/2}}} + \int_{-\pi/2}^{\pi/2} \tan \frac{u}{4} \sin u \, \mathrm{d}u \end{align*}

The last integral can be dealt as follows:

\begin{align*} \int_{-\pi/2}^{\pi/2} \tan \frac{u}{4} \sin u \, \mathrm{d}u \; &\overset{y=u/4}{=\! =\! =\! =\!} \; 4 \int_{-\pi/8}^{\pi/8} \tan y \sin 4y \, \mathrm{d}y\\ &=4 \int_{-\pi/8}^{\pi/8} \tan y \left ( 4 \sin y \cos^3 y - 4 \sin^3 y \cos y \right )\, \mathrm{d}y \\ &=4 \int_{-\pi/8}^{\pi/8} \left ( 4 \sin^2 y \cos^2 y - 4 \sin^4 y \right )\, \mathrm{d}y \\ &= 16 \int_{-\pi/8}^{\pi/8} \left ( \sin y \cos y \right )^2 \, \mathrm{d} y - 16 \int_{-\pi/8}^{\pi/8} \sin^4 y \, \mathrm{d}y \\ &= \left (\frac{\pi}{2} - 1 \right ) + \left (-1 + 4 \sqrt{2} - \frac{3\pi}{2} \right ) \\ &= 4\sqrt{2} - \pi - 2 \end{align*}

Basically as in @RE60K's answer. The results arise in view of the identities:

$$\sin^4 x = \frac{1}{8} \left ( 3 + \cos 4x - 4 \cos 2x \right )$$

and

\begin{align*} \int_{-\pi/8}^{\pi/8} \sin^2 x \cos^2 x \, \mathrm{d}x &= \int_{-\pi/8}^{\pi/8} \left ( \sin x \cos x \right )^2 \, \mathrm{d} x\\ &=\int_{-\pi/8}^{\pi/8} \left ( \frac{\sin 2x}{2} \right )^2 \, \mathrm{d}x\\ &= \frac{1}{4} \int_{-\pi/8}^{\pi/8} \sin^2 2x \, \mathrm{d}x\\ &=\frac{1}{8}\int_{-\pi/8}^{\pi/8} \left ( 1- \cos 4x \right ) \, \mathrm{d}x \\ &= \frac{1}{8} \left ( \frac{\pi}{4} - \frac{1}{2} \right ) \\ &= \frac{\pi}{32} - \frac{1}{16} \end{align*}

I know I'm 9 years late but I wanted to present the method of squares.