Two different answers of same indefinite integral

104 Views Asked by At

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.

1

There are 1 best solutions below

9
On BEST ANSWER

The is not a definite integral and $y$ is not a dummy variable.

$$-\int \frac {dy}{y^2-y+1}=-\int \frac {dx}{x^2-x+1}$$

is incorrect.


Indeed, we have $\displaystyle I=\frac{2}{\sqrt{3}}\tan^{-1}\left(\frac{2x-1}{\sqrt{3}}\right)+C$.

$\displaystyle I=-\int\frac{dy}{y^2-y+1}$ implies that $\displaystyle \int\frac{dx}{x^2-x+1}+\int\frac{dy}{y^2-y+1}$ is a constant (not necessarily zero).

As $\displaystyle y=\frac{1}{x}$, it means that $\displaystyle \frac{2}{\sqrt{3}}\tan^{-1}\left(\frac{2x-1}{\sqrt{3}}\right)+\frac{2}{\sqrt{3}}\tan^{-1}\left(\frac{\frac{2}{x}-1}{\sqrt{3}}\right)$ is a constant.

Note: This constant is different when $x>0$ and $x<0$.