Why is $\int \frac{dx}{x^2+1} = \arctan(x)$? Why is $\int \frac{dx}{x^2+1} = \arctan(x)$? I understand the proofs of it, I guess I just don't get the intuition behind it. If I hadn't been taught (and then looked up the derivation) of this fact, I would've thought it was related to the natural log, like $\int \frac{dx}{x}$. So my question is, what mechanism causes this to not be of the same form?
 A: To show a second method to solving this, see that we have the geometric series:
$$1+r+r^2+r^3+\dots=\frac1{1-r}$$
Let $r\to-x^2$:
$$1-x^2+x^4-x^6+\dots=\frac1{1+x^2}$$
Integrate both sides:
$$\int1-x^2+x^4-x^6+\dots dx=\int\frac1{1+x^2}dx$$
$$\int\frac1{1+x^2}dx=c+x-\frac13x^3+\frac15x^5-\frac17x^7+\dots$$
which happens to be the series expansion of $\arctan(x)$ for $|x|<1$:
$$\arctan(x)=x-\frac13x^3+\frac15x^5-\frac17x^7+\dots$$
A: It is related to the natural log, as follows. You can use partial fraction decomposition over $\mathbb{C}$ to rewrite the integrand as
$$\frac{1}{x^2 + 1} = \frac{1}{2i} \left( \frac{1}{x - i} - \frac{1}{x + i} \right)$$
and then integrating gives, at least formally,
$$\int \frac{dx}{x^2 + 1} = \frac{1}{2i} \left( \log (x - i) - \log (x + i) \right) = \frac{1}{2i} \log \frac{x-i}{x+i} + C.$$
It's true but not obvious that this is also $\arctan x$. The idea here is to use Euler's formula
$$\cos x + i \sin x = e^{ix}$$
to express $\tan x$ in terms of complex exponentials. 
