# Where is the flaw in this reasoning? Change of variables

We make the change of variables $x = -w$, $dx = -dw$, and change the limits of integration to obtain

$\begin{eqnarray*} \int_{-\infty}^0 \frac{x^2}{1+x^4} \log|x| \; dx &=& -\int_0^\infty \frac{w^2}{1+w^4} \log|-w| \; dw \\ &=& -\int_0^\infty \frac{w^2}{1+w^4} \log w \; dw \end{eqnarray*}$

But this is clearly wrong, since $\frac{x^2}{1+x^4} \log|x|$ is an even function. Where is the mistake?

-
After the substitution you get the integral $\int_{\infty}^0\dots$. Flipping the limits gives you another negative sign. –  Miha Habič May 17 '12 at 19:38
I see. Thanks you! –  user90123 May 17 '12 at 19:41
@MihaHabič Please do post this as a solution. –  Sasha May 17 '12 at 19:42
You skipped a step in your manipulation, which led to your confusion. When you introduced the substitution $x=-w$, you changed the bounds of integration, but not appropriately. Your first line should read $$\int_{-\infty}^0\frac{x^2}{1+x^4}\log|x|\,dx = -\int_{\infty}^0\frac{w^2}{1+w^4}\log|w|\,dw$$ We then flip the bounds to get the usual orientation, which produces another negative sign. Therefore $$\int_{-\infty}^0\frac{x^2}{1+x^4}\log|x|\,dx = \int_0^{\infty}\frac{w^2}{1+w^4}\log|w|\,dw$$ as expected.