Evaluate $$\int \frac {dx}{x^2-x+1}$$
Method 1
$$\int \frac {dx}{x^2-x+1}=\frac {4}{3}\int \frac {dx}{1+\frac {4(x-1/2)^2}{3}}$$
Put $u=x-1/2$
Hence $$\frac 43\int \frac {dx}{1+\frac {4(x-1/2)^2}{3}} =\frac 43\int \frac {du}{1+\frac {4u^2}{3}}$$
And then I could use $$\int \frac {dx}{1+x^2}=\arctan x$$
Method 2
Let $$I=\int \frac {dx}{x^2-x+1}$$
Put $x=\frac 1y$
Hence $dx=\frac {-dy}{y^2}$
Hence $$I=\int \frac {\frac {-dy}{y^2}}{\frac {1}{y^2}-\frac 1y+1}=-\int \frac {dy}{y^2-y+1}=-\int \frac {dx}{x^2-x+1}=-I$$
Hence $$I=-I\Rightarrow I=0$$
Why am I getting two different answers? I guess i am missing some link in method 2.