Solve an indefinite integral Find the value of 
$$  \int\frac{\sqrt{1+x^2}}{1-x^2}dx  $$
My Attempt: I tried to arrange the numerator as follows, 
$$ \sqrt{1+x^2} = \sqrt{1-x^2 + 2x^2} $$ 
but that didn't help me.
Any help will be appreciated.
 A: HINT: Make the substitution $1+x^2 \to u$ or $x \to \sqrt{u-1}$. Then you can transform the integral into
$$\int -\frac{\sqrt u}{u}\cdot\frac{1}{2\sqrt{u-1}}du$$
$$\int -\frac{1}{\sqrt u}\cdot\frac{1}{2\sqrt{u-1}}du$$
$$-\frac{1}{2}\int \frac{1}{\sqrt{u^2-u}}du$$
Then complete the square in the denominator:
$$-\frac{1}{2}\int \frac{1}{\sqrt{(u-\frac{1}{2})^2-\frac{1}{4}}}du$$
Now see if you can get it in the form
$$\int \frac{1}{\sqrt{a^2-1}}$$
so that you can use the formula
$$\int \frac{1}{\sqrt{a^2-1}}=\ln\bigg(\sqrt{x^2-1}+x\bigg)+C$$
A: Hint 1: Using $x=\tan(u)$, we get
$$
\begin{align}
\int\frac{\sqrt{1+x^2}}{1-x^2}\,\mathrm{d}x
&=\int\frac{\sec^3(u)}{1-\tan^2(u)}\,\mathrm{d}u\\
&=\int\frac{\sec(u)}{\cos^2(u)-\sin^2(u)}\,\mathrm{d}u\\
&=\int\frac{\sec^2(u)}{1-2\sin^2(u)}\,\mathrm{d}\sin(u)\\
&=\int\frac{\mathrm{d}\sin(u)}{\left(1-2\sin^2(u)\right)\left(1-\sin^2(u)\right)}\\
\end{align}
$$
Hint 2: Use partial fractions:
$$
\begin{align}
&\frac1{\left(1-2v^2\right)\left(1-v^2\right)}\\
&=\frac2{1-2v^2}-\frac1{1-v^2}\\
&=\frac1{1-\sqrt2v}+\frac1{1+\sqrt2v}-\frac{1/2}{1-v}-\frac{1/2}{1+v}
\end{align}
$$
A: I dont know complex integration but you can substitute $x=\tan (t) $ we get $\int \frac {\sec^3 (t)}{1-\tan^2 (t)} $ which simplifies to $\int \frac {1}{\cos (x)\cos (2x)} $ from here write it as $\int \frac {1}{(\cos (x))(\cos^2 (x)-\sin^2 (x))} $ which simplies to $\frac {\cos (x)}{(1-sin^2 (x))(1-2sin^2 (x)} $ use $\sin (x)=u $  hence integral changes to $\int \frac {1}{(1-u^2)(1-2u^2)} $ which can be easily done using partial fractions. And the integral can be calculated quite easily. Hope you are fine with real integration.
A: Try $x=\cos \phi$. Then you get $1+x^2=2\cos^2 \frac{\phi}{2}$, $1-x^2=\sin^2\phi$ and $dx=-\sin\phi\,d\phi$. Finally you will use $\sin\phi=2\sin\frac{\phi}{2}\cos\frac{\phi}{2}$ and you get an integral you can find in most tables.
