# Why doesn't substituting $u=\sqrt{x}$ help compute $\int_1^\infty\frac{\sqrt{x}}{x+1} \,\,\,dx$?

I'm trying to integrate $$\int_1^\infty\frac{\sqrt{x}}{x+1} \,\,\,dx$$ I do a $$u$$ substitution with $$u=\sqrt{x}$$ to get $$2\int_1^\infty\frac{u^2}{u^2+1} \,\,\,du$$ At this point everything should be correct. From here, I tried to proceed by dividing the numerator and denominator by $$u^2$$ to get $$2\int_1^\infty\frac{1}{1+\frac{1}{u^2}} \,\,\,du=2\left[\arctan(\frac{1}{u})\right]_1^\infty$$ However, this seems to be incorrect. The method that Symbolab uses is to go from Step 2 to $$2\int_1^\infty-\frac{1}{1+u^2}+1 \,\,\,du=2\left[-\arctan(u)+u\right]_1^\infty$$As far as I can tell, $$\frac{1}{1+\frac{1}{u^2}}=-\frac{1}{1+u^2}+1$$so why am I getting a different result? Thanks!

$$2\int_1^\infty\frac{1}{1+\frac{1}{u^2}} \,\,\,du=2\left[arctan(\frac{1}{u})\right]_1^\infty$$
is incorrect. The correct integral formula is $$\int\frac{1}{1+\frac{1}{u^2}}d\left(\frac{1}{u}\right)=\arctan(\frac{1}{u})$$ which is, however, not directly applicable in your question.
What you should do is write $$\frac{u^2}{1+u^2}=1-\frac{1}{1+u^2}$$ and then use $$\int\frac{1}{1+u^2}du=\arctan(u)$$
I figured it out: using $$\frac{1}{u}$$ as $$u$$ in the formula is not ok because it changes what $$du$$ is. To use my method, I would have to add in another variable, $$v$$, as in $$v=\frac{1}{u},\,\,\,\,\,\,\,dv=-\frac{1}{u^2}du$$ At this point, the integration no longer works easily, so better to keep the original $$u$$ intact and manipulate the expression the way that Symbolab did.
In this case, the integral actually doesn't converge - the integrand is proportional to $$x^{-0.5}$$, which diverges, so the actual integration is not needed.