Complete $\int \frac{x^2}{\sqrt{9x^2-1}}dx$ I am trying to solve the integral $$\int \frac{x^2}{\sqrt{9x^2-1}}dx,$$ but I am not sure how to solve it.
I have thought substitute $x$ by $\frac{\sec(u)}{3}$. Then $dx = \frac{1}{3} \tan(u)\sec(u)$,
$\sqrt{9x^2 -1} = \sqrt{\sec^2(u) - 1} = \tan(u)$ and $u = \sec^{-1}$(3x)
$$\int \frac{x^2}{\sqrt{9x^2-1}}dx = \int \frac{\sec^3(u)}{9}du$$
I am just not sure how to finish that? Can someone help me with that?
 A: First Way
Break down the $\sec^3{x}$ and integrate by parts
$$ I = \int \sec^3{x} dx = \int \sec^2{x} \sec{x} dx $$
Recalling:
$$ \int u dv = uv - \int vdu$$
Useful tip: Always try to recognize famous derivatives. Note that $ \sec^2{x}$ seems familiar so lets
use $dv = \sec^2{x} dx$ and $ u = \sec{x}$ then $v = \tan{x}$ and $ du = \sec{x} \tan{x} dx$.
$$ I = \tan{x} \sec{x} - \int \tan^2{x} \sec{x} dx$$
break up the $ tan^2{x} $ as $ \sec^2{x} - 1$
$$I =  \tan{x} \sec{x} - \int (\sec^2{x} - 1) \sec{x}  dx = \tan{x} \sec{x} + \int \sec{x} dx - \int \sec^3{x} dx$$
Note that $ \int \sec^3{x} = I$ so we added up for both sides and divide by two.
$$ I = \frac{1}{2} (\tan{x} \sec{x} + \int \sec{x} dx ) =\frac{1}{2} (\tan{x} \sec{x} + \ln{|\sec{x} + \tan{x}} |) + C $$
Second way :
You can also directly  apply integration by parts at the very beginning.
In fact, using integration by parts can also be applied. Let $ dv = \frac{x}{\sqrt{x^2 -1}} \,dx $ and $u = x$
then:
$$ \int dv = v = \int  \frac{x}{\sqrt{x^2 -1}} dx    $$
Use $z^2 = x^2 - 1$ and $2zdz = 2x dx$
$$ \int dv = v = \int \frac{z dx}{z} = \int dz = z = \sqrt{x^2 - 1} $$
Finally plugging v, u, dv, and du in the integration by parts formula.
$$ \int \frac{x^2}{\sqrt{x^2 -1}} dx = x \sqrt{x^2 - 1} - \int \sqrt{x^2 - 1}dx$$
$ x = \sec{\theta} $, $dx = \sec{\theta}\tan{\theta} d\theta$
$$ \int \sqrt{x^2 - 1} dx = \int \sqrt{\sec^2{\theta} - 1}  \sec{\theta}\tan{\theta}  d\theta = \int \tan^2{\theta} \sec{\theta} d\theta = J $$
And then we apply the same method used in the first way, for that.
Hence, if you find J you get that
$$ \int \frac{x^2}{\sqrt{x^2 -1}} dx = x \sqrt{x^2 - 1} - J $$
A: HINT:
Write $\sec^3(x)\,dx$ as $$\sec^3(x)\,dx=\frac{1}{(1-\sin^2(x))^2}\,d(\sin(x))$$
A: There is a specific formula that helps in your case that helps "remove" the powers on a secant integral.
$$\int \sec ^n\left(x\right)dx=\frac{\sec ^{n-1}\left(x\right)\sin \left(x\right)}{n-1}+\frac{n-2}{n-1}\int \sec ^{n-2}\left(x\right)dx$$
Also I think you missed a 3 somewhere, during the substitution the dx should give you 1 three but the x squared should give you an additional 2.
Using this formula at $n=3$ we have:
$$\frac{1}{27}\int \sec ^3\left(u\right)du=\frac{1}{27}\left(\frac{\sec ^{2}\left(u\right)\sin \left(u\right)}{2}+\frac{1}{2}\int \sec\left(u\right)du\right)$$
$$=\frac{1}{27}\left(\frac{\sec ^{2}\left(u\right)\sin \left(u\right)}{2}+\frac{1}{2}\ln \left|\tan \left(u\right)+\sec \left(u\right)\right|\right)$$
$$=\frac{1}{27}\left(\frac{1}{2}\sec \left(u\right)\tan \left(u\right)+\frac{1}{2}\ln \left|\tan \left(u\right)+\sec \left(u\right)\right|\right)$$
Finally, $u=sec^{−1}(3x)$ and the $+C$:
$$=\frac{1}{27}\left(\frac{3}{2}x\sqrt{9x^2-1}+\frac{1}{2}\ln \left|\sqrt{9x^2-1}+3x\right|\right) + C$$
