Using $x=\tan \theta$ to solve $\int x\sqrt{1+x^2}\,\mathrm dx$ I'm having a lot, I repeat, a lot of trouble with Calculus II, particularly trigonometric substitution. At the moment, I'm extremely confused as to how to integrate $\int x\sqrt{1+x^2}\,\mathrm dx$ using trigonometric substitution. Here's what I have so far):
$$\int x\sqrt{1+x^2}\,\mathrm dx, x=\tan\theta, dx=\sec^2\theta d\theta$$
$$\int \tan\theta \sec^3\theta \,\mathrm dx, u=\sec\theta, \,\mathrm du=\tan\theta \sec\theta \,\mathrm d\theta$$
$$\int u^2 \,\mathrm du$$
$$\frac13\tan\theta + C$$
$$\frac13\sqrt{1+x^2} + C$$
However, the book says the answer is $\frac13(1+x^2)^{3/2} + C$. I don't understand where that extra magnitude of power coming from. Where did I mess up, and what strategies can I use to prevent me from making that and similar mistakes in the future? Thank you in advance for your responses.
 A: We don't need to use trig substitutions in this problem.
$$
\begin{align}
\int x\sqrt{1+x^2}\,\mathrm{d}x
&=\frac12\int(1+x^2)^{1/2}\,\mathrm{d}(1+x^2)\\
&=\frac12\left(\frac23(1+x^2)^{3/2}+2C\right)\\
&=\frac13(1+x^2)^{3/2}+C
\end{align}
$$

Note that in your answer you have 
$$
\int u^2\,\mathrm{d}u=\frac13\tan(\theta)+C
$$
where it should be
$$
\begin{align}
\int u^2\,\mathrm{d}u
&=\frac13u^3+C\\
&=\frac13\sec^3(\theta)+C
\end{align}
$$
which will give the correct answer since $\sec(\theta)=\sqrt{1+x^2}$.
A: When you integrate $\int w^2 dw$, you should get $\frac{w^3}{3}+c=\frac{\sec^3x}{3}+c=\frac{(1+x^2)^{\frac{3}{2}}}{3}+c$
Your error lies in the fact that despite $u=\sec \theta$, you suddenly just let the integral be the primitive of $\frac{\tan \theta}{3}+c$.
To prevent making similar mistakes in the future, just make sure that you're consistent with your algebra and read each line carefully (sorry if this isn't of much assistance but it's all I can really think of).
A: You're right by using the substitution $x=\tan\left(\theta\right)$, so your problem becomes
$$\int x\sqrt{1+x^2} dx,$$
\begin{equation}\text{since we may substitute}\:
\left\{\begin{array}{lr}
x=\tan\left(\theta\right),\:\:dx=\sec^{2}\left(\theta\right)d\theta, \\
1+x^2=1+\tan^2\left(\theta\right)=\sec^{2}\left(\theta\right).
\end{array}\right.
\end{equation}
\begin{equation}
\therefore \int x\sqrt{1+x^2}dx=\int\tan\left(\theta\right)\cdot\sqrt{\sec^2\left(\theta\right)}\:sec^2\left(\theta\right)\:d\theta=\int\tan\left(\theta\right)\sec^3\left(\theta\right)d\theta=\left(\frac{1}{3}\right)\sec^{3}\left(\theta\right),
\end{equation}
and now we re-substitute in terms of $x$ and find that 
\begin{equation}
\left(\frac{1}{3}\right)\sec^3\left(\theta\right)=\left(\frac{1}{3}\right)\left(\sqrt{1+x^2}\right)^{3}=\boxed{\frac{\left(1+x^2\right)^\frac{3}{2}}{3}+C_1.}
\end{equation}
