I need help on understanding an integral substitution So I want to integrate $\frac{1}{x^2+10x+50}$ and when I calculate it with an online calculator, I get $\frac{1}{x^2+10x+50}=\frac{1}{(x+5)^2+25} => u=\frac{x+5}{5}=>\frac{du}{dx}=\frac{1}{5}$
so that
$\frac{1}{x^2+10x+50}=\frac{1}{5}\frac{1}{u^2+1}$
As far as I understood, the most common substitution I see is that the term is transformed into a function times the derivative of said function, which is when you can substitute the function and the derivative disappears. Here I can't wrap my head around as to what happens mathematically in this substitution - any help? 
 A: You placed your square in the wrong places.  You should instead have
$$\frac1{x^2+10x+50}=\frac1{(x+5)^2+25}$$
Then let $u=x+5$, and it simplifies to
$$\frac1{u^2+5^2}$$
Which is a simple arctangent integral:
$$\int\frac1{u^2+5^2}\ du=\frac15\arctan\left(\frac u5\right)+c=\frac15\arctan\left(\frac{x+5}5\right)+c$$
where in general we have
$$\int\frac1{u^2+a^2}\ du=\frac1{|a|}\arctan\left(\frac u{|a|}\right)+c$$
A: The arc tangent integral which often is to learn by heart is actually a short-cut for the arcus tangens expanded to complex numbers which can be defined as:
$$\arctan(x) = \frac{i}{2}\left(\phantom{\frac{}{}}\ln(1-ix) - \ln(1+ix)\phantom{\frac{}{}}\right)$$
In combination with the traditional fraction-decomposition which you would do whenever you encounter a fraction between two polynomials $\frac{P(x)}{Q(x)}$ to try and reduce to lowest degrees:
$$\frac{1}{1+x^2} = \left(\phantom{\frac{1}{1}}\text{conjugate rule}\phantom{\frac{1}{1}}\right)  = \frac{1}{(1+ix)(1-ix)} = \left(\phantom{\frac{1}{1}} \text{partial fraction}\phantom{\frac{1}{1}}\right) = \frac{1}{1+ix}-\frac{1}{1-ix}$$
Then the denominators of that expression will have the natural logs as their integrals.
You probably won't encounter this until your first course (analysis) in one complex variable. But it's good to know it's not any particular "special magic" about the arc tan function.
