Integrate $x^3\sqrt{x^2-9}\,dx$ with trig substitution $\newcommand{\arcsec}{\operatorname{arcsec}}$This expression can be integrated without trig substitution, but I wanted to try using it anyways and got a different answer.
Starting with finding the indefinite integral $$\int x^3\sqrt{x^2-9} \, dx$$
I then substituted $x = 3\sec\theta$, $\theta = \arcsec(\frac{x}{3})$, and $d\theta = \frac{3}{\sqrt{x^2-9} |x|} \, dx$.
Plugging these values into the original integral,
$$\int 27\sec^3\theta\sqrt{9\sec^2\theta - 9}\frac{3}{\sqrt{9\sec^2\theta-9} |3\sec\theta|} \, d\theta$$
$$\int \frac{81\sec^3\theta3\tan\theta}{3\tan\theta |3\sec\theta|} \, d\theta$$
$$\int \frac{81\sec^3\theta}{|3\sec\theta|} \, d\theta$$
$$\int 27\sec^2\theta \, d\theta$$
$$27\tan\theta + C$$
Now substituting $x$ back in and simplifying:
$$27\tan(\arcsec(\frac{x}{3})) + C$$
$$9\operatorname{sgn}(x)\sqrt{x^2-9} + C$$
This does not seem close at all to the solution I found by $u$-substitution,
$$\frac{(x^2-9)^\frac{3}{2}(x^2+6)}{5} + C$$
I am relatively new to integration so I think I made a mistake. What did I do wrong? Any help appreciated.
 A: With a u-substitution:
$\int x^3\sqrt{x^2-9} \ dx\\
\int \frac 12 x^2\sqrt{x^2-9} (2x\ dx)\\
u = x^2 - 9\\
x^2 = u+9\\
du = 2x\ dx\\
\frac 12\int (u+9)\sqrt{u}\ du\\
\frac 12(\frac 23 (9u^\frac 32) + \frac 25 u^\frac 52)+ C\\
3(x^2-9)^\frac 32 + \frac 15(x^2-9)^\frac 52 + C$
With a trig substitution:
$\int x^3\sqrt{x^2-9} \ dx\\
x = 3\sec\theta\\
dx = 3\sec\theta\tan\theta\\
3^5\int \sec^4\theta\tan^2\theta\ d\theta\\
3^5\int (\tan^2\theta\ + \tan^4\theta)\sec^2\theta d\theta\\
3^5 (\frac 13\tan^3\theta\ + \frac 15\tan^5\theta) + C\\
3^5 (\frac 13 (\frac {x^2}{9}-1)^\frac 32 + \frac 15(\frac {x^2}{9}-1)^\frac 52) + C\\
3^5 (\frac 13 \frac {(x^2-9)^\frac 32}{3^3} + \frac 15\frac {(x^2-9)^\frac 52}{3^5}) + C\\
3(x^2-9)^\frac 32 + \frac 15(x^2-9)^\frac 52 + C$
If you want to use the substitution
$\theta = \sec^{-1} \frac {x}{3}\\ dx = \frac {3}{x\sqrt{x^2-9}}$
$\int x^3\sqrt{x^2-9} \ dx\\
\int \frac 13 x^4(x^2-9)\left(\frac {3}{x\sqrt{x^2-9}}\ dx\right)\\
\frac 13 \int  (3^4\sec^4 \theta) (3^2\tan^2\theta)\ d\theta\\
$
And continue as above.
A: The mistake is in the differential $d\theta$. You accidentally switched $d\theta$ for $dx$. If you fix that it should be OK. Alternatively, differentiate $x=3\sec{\theta}$ on both sides, so you obtain:
$$dx=3\sec{\theta}\tan{\theta}\,d\theta$$
Try to do the rest from here
A: HINT
Make the change of variable $x = 3\cosh(u)$. Thus we get that
\begin{align*}
\int x^{3}\sqrt{x^{2} - 9}\mathrm{d}x & = 243\int\cosh^{3}(u)\sinh(u)\sqrt{\cosh^{2}(u) - 1}\mathrm{d}u\\\\
& = 243\int\cosh^{3}(u)\sinh^{2}(u)\mathrm{d}u\\\\
& = 243\int\cosh(u)\cosh^{2}(u)\sinh^{2}(u)\mathrm{d}u\\\\
& = 243\int\cosh(u)(1 + \sinh^{2}(u))\sinh^{2}(u)\mathrm{d}u\\\\
& = 243\int[\cosh(u)\sinh^{2}(u) + \cosh(u)\sinh^{4}(u)]\mathrm{d}u\\\\
& = 81\sinh^{3}(u) + \frac{243\sinh^{5}(u)}{5} + C
\end{align*}
Can you take it from here?
A: sometimes its easier to break it up into other expressions first:
$$I=\int x^3\sqrt{x^2-9}$$
$x=3u\Rightarrow dx=3du$
$$I=\int(3u)^3\sqrt{3^2(u^2-1)}(3du)$$
$$I=3^5\int u^3\sqrt{u^2-1}du$$
now we want to look for an identity that matches this, we know:

*

*$\cosh^2\theta-\sinh^2\theta=1$

*$\cos^2\theta+\sin^2\theta=1$
so we want to choose one of these that can be rearranged to our form, the nicest would be: $\cosh^2\theta-1=\sinh^2\theta$ so:
$u=\cosh(v)\Rightarrow du=\sinh(v)dv$ now replace everything:
$$I=3^5\int\cosh^3v\sqrt{\cosh^2v-1}\sinh v dv$$
$$I=3^5\int\cosh^3v\sinh^2vdv$$
A: Wouldn't be integration by parts much easier?  Start with
$$\frac12\int x^2\cdot2x\sqrt{x^2-9}\,dx.$$
A: \begin{aligned}
& \int x^{3} \sqrt{x^{2}-9} d x \\
=& \int \frac{x^{3}\left(x^{2}-9\right)}{\sqrt{x^{2}-9}} d x \\
=& \int x^{2}\left(x^{2}-9\right) d\left(\sqrt{x^{2}-9}\right) \\
=& \int\left(y^{2}+9\right) y^{2} d y,\text { where } y=\sqrt{x^{2}-9} \\
=& \frac{y^{5}}{5}+3 y^{3}+c \\
=& \frac{y^{3}}{5} \cdot\left(y^{2}+15\right)+c \\
=& \frac{\left(x^{2}-9\right)^{\frac{3}{2}}}{5}\left(x^{2}+6\right)+c
\end{aligned}
