# Understanding when to use different methods of integration

I'm trying to do some textbook problems, but I think there is one pivotal part I'm not understanding, because putting these methods of integration is not working for me.

For example:

given the problem

$$\int \frac{dx}{\sqrt {x^2 + 2x + 5}}$$

I complete the square, giving me

$$\int \frac{dx}{\sqrt {(x + 1)^2 + 4}}$$

This is where I lose understanding. I would simply reduce this to

$$\int \frac{dx}{(x + 1) + 2}$$

But an online calculator (Symbolab) would dictate I follow U-substitution, then substitute tan in for u, and so forth. I know there is something I don't understand, but I'm not sure what. Any help is appreciated, thank you!

• The problem here is that $\sqrt{A^2+B^2}$ is not the same as $\sqrt{A^2} + \sqrt{B^2},$ $\vphantom{\dfrac{}{\displaystyle\sum}}$ even when $A$ and $B$ are both positive. For example, $\sqrt{3^2+4^2} = \sqrt{25} = 5,$ but $\sqrt{3^2} + \sqrt{4^2} = 7. \qquad$ – Michael Hardy Sep 20 '17 at 17:32
• As often happens in our irresponsible curriculum, your difficulty in calculus comes from weakness in prerequisites to calculus. Universities knowingly encourage unprepared students to take calculus. They bring in tuition money. It's academic prostitution. If some math faculty members are aware of this and disapprove of it, they don't know how to handle the situation for the same reason their students have trouble in math, namely dealing with things like this is not what they're interested in; they're interesting it doing and publishing research. – Michael Hardy Sep 20 '17 at 17:36
• I agree. It is also a fault of mine for being lazy in my math work when I was younger, however. But thank you, I'll have to brush up more on the basics! – Howard P Sep 20 '17 at 17:39

If you want to understand calculus, you need to learn the basics. It should be totally clear to you that $\sqrt{a+b} \neq \sqrt a + \sqrt b$, as already mentioned in the commends.
Hint: Completing the square is a good idea. If you think of $$\int \frac{1}{\sqrt{1-x^2}} \; \mathrm d x= \arcsin x + C$$ how can you manipulate (substitute) to get there? You might want to factor out $2=\sqrt 4$ in the integral $$\int \frac{1}{\sqrt {(x + 1)^2 + 4}} \:\mathrm d x$$ first.
set $$\sqrt{x^2+2x+5}=t+x$$ to compute the integral squaring the whole equation and solving for $x$ we get $$x=\frac{t^2-5}{2-2t}$$ then you can compute $$dx$$ $$dx=-1/2\,{\frac {{t}^{2}-2\,t+5}{ \left( -1+t \right) ^{2}}}dt$$