Define $f:\mathbb R \rightarrow \mathbb R$ by $f(x)=\frac{1}{1+3\cos^{2}x}$.
Since $f$ is continuous, $f$ has an antiderivative. That is, there exists some function $F:\mathbb R \rightarrow \mathbb R$ such that $F^{\prime}=f$.
Using the substitution $u=\tan x$ and doing some work, we find that a possible antiderivative of $f$ is the function $g$ defined by $g(x)=\frac{1}{2}\tan^{-1}\frac{\tan x}{2}$.
However, the problem with $g$ is that it's not defined at odd multiples of $\pi/2$, while the $F$ we're seeking is defined on $\mathbb R$.
So, what is $F$ and how do we find it?
(Or is there a mistake somewhere in my argument above?)