I am currently trying to show that $\int_{-\infty}^\infty \cos(x^2) \, \mathrm dx = \sqrt{\frac{\pi}{2}}$ and the last integral I have to evaluate is
$$\int_{-a}^a \frac{x^2}{x^4+1} \, \mathrm dx.$$
Now of course I'm familiar with wolframalpha, however the way it solves this integral seems very awkward and also not elegant to me, even though the function to me looks quite simple. So, is there a simpler way to solve this integral or is the way described on wolframalpha already (one of) the simplest approach(es)? I ask this because often wolframalpha doesn't see tricks (occurred to me when I wanted to find a formula for the n-th derivative of some function) which a human eye might see.

Thanks for any answers in advance.

This answer addresses the question of finding the indefinite integral, and tries to show that there is less to the Wolfram Alpha answer than meets the eye.

Part of the reason the integral is frightening is that when we factor $x^4+1$, we run into a bunch of $\sqrt{2}$.  Then completing the square, so natural with simpler numbers, suddenly becomes worrisome.  We, who are so rational,  are confronted by too many irrationals.

Here is a simple suggestion.  Make the change of variable $x=y/\sqrt{2}$.  Very quickly, we arrive at 
$$\int \frac{\sqrt{2}\,y^2}{y^4+4}dy$$
Why this change of variable?  Maybe we recall from a contest the question about $n^4+4$ being hardly ever prime. The solution hinges on the fact that the polynomial $y^4+4$ factors nicely:
$$y^4+4=(y^2-2y+2)(y^2+2y+2)$$
The factorization is an application of the fundamental result:
$$2+2=2\times 2$$

We will forget about the $\sqrt{2}$ until the end.  And because fractions can be so fractious, we look at the integral
$$\int \frac{8y^2}{y^4+4}dy$$
Note that
$$\frac{8y^2}{y^4+4}=\frac{2y}{y^2-2y+2} +\frac{-2y}{y^2+2y+2}$$
To integrate the first summand, note that we want
$$\int\frac{(2y-2)+2}{y^2-2y+2}dy$$
The integral of $\frac{2y-2}{y^2-2y+2}$ is easy, the derivative of the bottom is sitting on top.  The integral of $\frac{2}{y^2-2y+2}$ is almost as unthreatening, since completing the square is irresistible.  

The other integral can be done in the same way. But it is  more virtuous to recycle. Let $y=-z$ and notice that we get something familiar.
