I have to calculate this integral:
\begin{align} \int x^{2}\sqrt{a^{2}+x^{2}}\,dx \qquad\text{with} \quad a \in \mathbb{R} \end{align}
My attempt:
Using, trigonometric substitution
\begin{align} \tan \theta &= \frac{x}{a}\\ \Longrightarrow \ x&=a \tan \theta\\ \Longrightarrow \ dx&=a \sec^{2}\theta\\ \Longrightarrow \ x^{2}&=a^{2}\tan^{2}\theta \end{align}
Thus, \begin{align} \int x^{2}\sqrt{a^{2}+x^{2}}\,dx&=\int a^2 \tan^{2}\theta \sqrt{a^2+a^2\tan^{2}\theta}\ a\sec^{2}\theta\, d \theta\\&=a^{3}\int \tan^{2}\theta \sqrt{a^{2}(1+\tan^{2}\theta)}\sec^{2}\theta\, d\theta\\&=a^{3}\int \tan^{2}\theta \sqrt{a^{2}(\sec^{2}\theta)}\sec^{2}\theta \, d\theta\\&=a^{4}\int (1-\sec^{2}\theta)\sec^{3}\theta \, d\theta\\&=a^{4}\underbrace{\int \sec^{3}\theta \, d\theta}_{\text{solve by parts}}-a^{4}\underbrace{\int \sec^{5}\theta \, d\theta}_{\text{solve by parts}} \end{align}
My doubt is: Is there any other way to solve it faster? Because by parts is a large process to solve each one. I really appreciate your help