Evaluating the following integral: $ \int \frac{x^2}{\sqrt{x^2 - 1}} \text{ d}x$ For this indefinite integral, I decided to use the substitution $x = \cosh u$ and I've ended up with a $| \sinh u |$ term in the denominator which I'm unsure about dealing with: $$\int \dfrac{x^2}{\sqrt{x^2 - 1}} \text{ d}x \ \overset{x = \cosh u}= \int \dfrac{\cosh^2 u \cdot \sinh u}{\left| \sinh u \right|} \text{ d}u$$
How would I deal with the denominator?
 A: $\dfrac t{|t|}=\pm1$, depending on whether t is positive or negative. Now, $\displaystyle\int a\cdot f(u)~du=a\cdot\int f(u)~du$. 
In this case, $a=\pm1$. As far as the actual integration is concerned, use $\cosh^2x=\dfrac{1+\cosh2x}2$
A: On your method, you can use the sign function $\mathrm{sgn}$ which can be used as
$$|\sinh (u)| = \mathrm{sgn} (\sinh u) \sinh u$$
Your integral becomes 
$$\int \cosh^2u  \, \mathrm{sgn}(\sinh (u)) du = \int \frac 1 2 ( 1+ \cosh (2u)) \mathrm{sgn}(\sinh u) du$$
this equals 
$$\frac 1 2u \, \mathrm{sgn}(\sinh u)+ \frac 1 4 \sinh (2u) \mathrm{sgn}(\sinh u) $$
Upon simplification, using inverse hyperbolic substitution back to $x$ substitution, you get 
$$\frac 1 2 \log |x + \sqrt{x^2 - 1}| + \frac 1 2 x\sqrt{1-x^2}$$
also the relation $\mathrm{sgn}(\sinh u) \sinh u = \sqrt{1 - x^2}$ and $\mathrm{sgn}(\sinh u) u = |u|$ (note that I am only taking positive values multiplied with $\mathrm{sgn}$)  and $ |x + \sqrt{x^2 - 1}|\ge 1$ for $x\ge -1$
A: I found another excellent answer from @MartinSleziak :3
Let us denote your function by $f(x)$. Suppose that we are able to solve the problem for $[1,\infty)$, i.e. that we can find the primitive function $F$ such that $F'(x)=f(x)$ for each $x\in[1,\infty)$.
Now we can notice that $f(x)=f(-x)$.
So if we take $G(x)=-F(-x)$ for $x\le-1$,, then $G'(x)=F'(-x)=f(-x)=f(x)$.
So from the primitive function on $[1,\infty)$ you can get primitive function on $(-\infty,-1]$ simply by using the fact that you want the primitive function to be odd. (The original function was even.)
Of course, then you can add constants, so you can get $G(x)+C_1$ and $F(x)+C_2$.
But if you insist that you want to try to do this by substitution, you could use $x=-\cosh u$.
Clearly, $-\cosh u$ attains exactly the values in the interval $(-\infty,1]$.
A: First assume that $x=\tan u$, after replacing this value, $dx=du/(\cos u)^2$
in terms of $u$ variable, the integral will be $$I=\int\cos u (\sin u)^2 du.$$
Then replace $sin u= v$, you gotta find that $\cos u du=dv$. With v variable, we will have $I=\int v^2 dv$
and the result (answer) in terms of $v$ variable is $\tfrac{v^3}3+c$
going back to $u$ variable, we have this solution $\tfrac{\sin^3 u}3+c$
and by replacing $u$ by its value $\arctan x$, the result is: $$\boxed{\displaystyle\dfrac13 \sin ^3(\arctan x)+c}$$
A: Alternatively, we can solve it by just doing a trick:
$$\dfrac{x^2}{\sqrt{x^2 - 1}} = \dfrac{x^2 - 1 + 1}{\sqrt{x^2 - 1}} = \sqrt{x^2 - 1} + \dfrac{1}{\sqrt{x^2 - 1}}.$$
Then let $x = \sec\theta$.
