Evaluating an integral using a trig substitution

calculusintegration

Problem:
Evaluate the following integral:
$$ \int \frac{\sqrt{x}}{1+x} \, dx $$
Answer:
Let $I$ be the integral we are evaluating. We are going to use the substitution $ \tan u = \sqrt{x}$. We have:
\begin{align*}
\sec^2{u} \,\, du &= \left( \frac{1}{2} \right) x^{ – \frac{1}{2} } \, dx \\
I &= 2 \int \frac{ \left( \frac{1}{2} \left( \frac{x}{ \sqrt{x} }\right) \right) }{1+x} \, dx \\
I &= 2 \int \frac{\tan^2{u}} {\tan^2{u}+ 1} \, du = 2 \int \frac{ \tan^2 u } { \sec^2 u } \, du \\
I &= 2 \int \sin^2 u \, du \\
\end{align*}

Now recall the trig idenity:
$$ \sin^2 \theta = \frac{2 – \cos{2 \theta} }{2} $$
\begin{align*}
I &= 2 \int \frac{2 – \cos{2 u} }{2} \, du = \int 2 – \cos{2 u} \, du \\
I &= 2u – \frac{\sin{2u}}{2} + C = 2u – \frac{\sqrt{ 1 – \cos^2{2u}}}{2} + C
\end{align*}

The book's answer is:
$$ \int \frac{\sqrt{x}}{1+x} \, dx = 2\sqrt{x} – 2\tan{( \sqrt{x}) } + C $$
I made a mistake in entering the book's answer. Here is what it should be:
The book's answer is:
$$ \int \frac{\sqrt{x}}{1+x} \, dx = 2\sqrt{x} – 2\tan^{-1}{( \sqrt{x}) } + C $$
Therefore, I conclude my answer is wrong. Where did I go wrong?

Best Answer

$$I=\int \frac{\sqrt{x}}{1+x} \, dx$$ Substitute $u=\sqrt x \implies dx=2udu $ $$I=2\int \frac{{u^2}}{1+u^2} \, du=2\int \frac{{u^2+1-1}}{1+u^2} \, du$$ $$I =2 \left(u-\int \frac{du}{1+u^2} \right)$$ $$I =2(u-\arctan u) +C =2(\sqrt{x}-\arctan \sqrt{x}) +C$$