<s>[INST] Integrating Question with U-Sub: $\int \tan^2\theta \sec^4\theta\ d\theta$ Question:
Find the value of the expression $$\int \tan^2\theta \sec^4\theta\ d\theta$$ by using the substitution $u=\tan\theta$.
My Working:
If $u=\tan\theta$, then
\begin{align}
\frac{du}{d\theta}&=\sec^2\theta\\
du&=\sec^2\theta\cdot d\theta\\
\int\tan^2\theta \sec^4\theta\ d\theta&=\int \tan^2\theta\cdot \sec^2\theta\cdot(\sec^2\theta\cdot d\theta)\\
&=^?\int u^2\cdot u^\prime\cdot du
\end{align}
After this, I do not know how to proceed as there is an extra remaining factor of $\sec^2\theta$, and I cannot use the product to sum formula as there is no $\sin x$ or $\cos x$. Could anyone please help? Thanks!
 [/INST] \begin{align}
\int\tan^2\theta \sec^4\theta\ d\theta&=\int \tan^2\theta\cdot \sec^2\theta\cdot(\sec^2\theta\cdot d\theta)\qquad(\text{say, }\tan\theta=u)\\
&=\int u^2\cdot (1+u^2)\cdot du\\
&=\int u^2 du +\int u^4 du\\
&=\frac{u^3}{3}+\frac{u^5}{5}+c\qquad(\text{some constant, }c)\\
&=\frac{\tan^3\theta}{3}+\frac{\tan^5\theta}{5}+c
\end{align}
</s>