help me to evaluate these integrals Find the value of $$\int\frac{x}{x^2-x+1} dx$$ and $$\int\frac{1}{x^2-x+1} dx$$ This was not the original question. Original question was tougher and I have simplified that to these two integrals. I am having a hard time evaluating these two integrals but what I know is that, in these two integrals there is arctan occurring in a term of both integrals. Maybe we have to do some operations in the numerators?
Any help will be greatly appreciated.
EDIT: The original question was: $$\int\frac{3x}{x^3+1}dx$$
EDIT: $$\begin{align}\int\frac{3x}{x^3+1}dx&=3\int\frac{x}{x^3+1}dx\\&=3\int\frac{x+1}{3x^2-3x+3}dx - 3\int\frac{1}{3x+3}dx\\&=\int\frac{x+1}{x^2-x+1}dx - \int\frac{1}{x+1}dx\end{align}$$
The value of last integral is $\ln|x+1|$ so we will consider it later. We will only consider the first integral now and we can write that as:
$$\int\frac{x}{x^2-x+1}dx + \int\frac{1}{x^2-x+1}dx$$ after this I am stuck.

Integral No. 1
$$\int \frac{dx}{x^2-x+1}= \int \frac{dx}{(x-\frac12)^2+\frac34}$$ Substitute $x-\frac12=t$ so $du = dt$. The integral becomes $$\int \frac{dt}{(t^2+\frac34)}=\frac{2}{\sqrt3}\arctan\frac{t}{\frac{\sqrt3}{2}}+c= \frac{2}{\sqrt3}\arctan\frac{2(x-\frac12)}{\sqrt3}+c = \frac{2}{\sqrt3}\arctan\frac{2x-1}{\sqrt3}+c .$$
Integral No. 2
$$\int \frac{xdx}{x^2-x+1}= \int \frac{x-\frac12+\frac12}{x^2-x+1}dx= \int \frac{x-\frac12+\frac12}{(x-\frac12)^2+\frac34}dx$$$$= \int \frac{x-\frac12}{(x-\frac12)^2+\frac34}dx+ \int \frac{\frac12}{(x-\frac12)^2+\frac34} dx $$ Now the second part is half of the first integral itself. For the first part, substitute $(x-\frac12)^2+\frac34=m$ and you should be able to finish it.
EDIT: After the m substitution, $2(x-\frac12)dx=dm$ so $(x-\frac12)dx=\frac{dm}{2}$. So the integral now is : $$\int \frac{dm}{2m}=\frac 12 \ln m + c=\frac12\ln(x^2-x+1)+c.$$
