Find $ \int \frac {1-x^2}{1+3x^2+x^4} \, \mathrm{d}x $ Today, the CalcBee sample problems got released. The following problem was my creation and I wanted to see how many solutions people can come up with. The result is very beautiful and I thought it would be instructive to see multiple solutions to this if they exist. Note that, on the real contest, none of the problems will be this hard. This was meant as a challenge since partial fractions do not exactly work right away. 

Find $ \displaystyle\int \frac {1-x^2}{1+3x^2+x^4} \, \mathrm{d}x $. 

 A: First substitute $x=e^y$ ("$dx=e^y dy$"):
$$\int\frac{1-x^2}{1+3x^2+x^4}dx=\int\frac{e^y-e^{3y}}{1+3e^{2y}+e^{4y}}dy=\int\frac{e^{-y}-e^y}{e^{-2y}+3+e^{2y}}dy=\int\frac{-2\sinh y}{(2\cosh y)^2+1}dy$$
Now substitute $z=2\cosh y$ ("$dz = 2\sinh y\,dy$"):
$$\int\frac{-2\sinh y}{(2\cosh y)^2+1}dy=\int\frac{-1}{z^2+1}dz=\text{arccot}\,z$$
So the answer should be
$$\text{arccot}(2\cosh y)=\text{arccot}(e^y+e^{-y})=\text{arccot}(x+1/x)$$
and it indeed is, as can be verified by taking the derivative.
A: HINT:
Divide the numerator & the denominator by $x^2$
and as $\int\left(1/x^2-1\right)dx=-x-\dfrac1x$
set $x+\dfrac1x=u$ and $\dfrac1{x^2}+3+x^2=\left(x+\dfrac1x\right)^2-2+3$
A: For the record, for ease of access, here is my solution. 

Notice that the degree of the denominator is double the degree of the numerator, so there is a possibility that the answer is of the form $ \arctan \left( f(x) \right) $, where $f(x)$ is a rational function. So we try it out. If this is the case, we have $$ \frac {f'(x)}{1 + \left[ f(x) \right]^2} = \frac {1-x^2}{1+3x^2+x^4}. $$Then, let $ f(x) = \frac {p(x)}{q(x)} $, where $p(x)$ and $q(x)$ are polynomials with degree $a$ and $b$, respectively. Then, $$ f'(x) = \frac {q(x) p'(x) - p(x) q'(x)}{\left[ q(x) \right]^2}, $$where the numerator has degree less than or equal to $a+b-1$ and the denominator has degree $2b$. Therefore, $b=2$ and $a=1$. Then, $$ f(x) = \frac {rx + s}{tx^2 + ux + v} \implies f'(x) = \frac {(rv-su) - 2stx - rtx^2}{t^2 x^4 + 2tux^3 + (2tv+u^2) x^2 + 2uvx + v^2}. $$Then, the derivative of $ \arctan \left( f(x) \right) $ is $$ \frac {f'(x)}{1 + \left[ f(x) \right]^2} = \frac {\frac {(rv-su) - 2stx - rtx^2}{t^2 x^4 + 2tux^3 + (2tv+u^2) x^2 + 2uvx + v^2}}{1 + \left( \frac {rx+s}{tx^2 + ux + v} \right)^2}. $$We find that $p(x)=x$ and $q(x)=1+x^2$, so our answer is $$ \boxed {\arctan \left( \frac {x}{1+x^2} \right)}. $$
