Integrate $x^3\sqrt{x^2-9}\,dx$ with trig substitution

calculusintegration

$\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.

Best Answer

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.

Related Question