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.

For the second one: A common method would be: complete the square in the denominator...
$$
x^2-x+1 = x^2 - x + \frac14+\frac34
=\left(x-\frac12\right)^2+\frac34
$$
Substitute $x-\frac12 = y$.
$$
\int\frac{1}{x^2-x+1}\;dx = \int\frac{1}{y^2+(\sqrt{3}/2)^2}\;dy
$$
recognize an arctangent integral
$$
=\frac{2}{\sqrt{3}}\arctan\left(\frac{2}{\sqrt{3}}y\right)+C
=\frac{2}{\sqrt{3}}\arctan\left(\frac{2x-1}{\sqrt{3}}\right)+C
$$
