How to take $\int^1_{-1} \frac{xdx}{x^2+x+1}$? Here's the integral:
$$\int^1_{-1} \frac{xdx}{x^2+x+1}$$
So I am basicly confused about $xdx$ if it were only $dx$ I would just compleate the square and go ahead with table formula, but as i can judge it doesn't work properly witx $xdx$
Can someone give me a hint, please?
 A: Two useful lemma for partial fraction decomposition: let the rational function $p/q$, where $p$ and $q$ are polynomials in one variable and the degree of $p$ is less than the degree of $q$ (otherwise divide $p$ by $q$ to obtain $s/q$ with the required conditions).
Suppose that the degree of $q$ is $n$, then we can decompose the rational function $p/q$ in simple fractions, that is exists some $a_{j,k}\in\Bbb C$ such that
$$\frac{p}q=\sum_{j=1}^{h}\sum_{k=1}^{m_j}\frac{a_{j,k}}{(x-r_j)^k}\tag{1}$$
where $r_j$ are the roots of $q$ and $m_j$ is it corresponding multiplicity. And where we have that
$$m_1+m_2+\ldots+m_h=n$$
Lemma 1: if the roots $r_j$ of $q$ are simple, that is if $m_j=1$ for all $j$, then we can find
$$a_j=\frac{p(r_j)}{q'(r_j)},\quad a_j\in\Bbb C$$
where $q'$ is the derivative of $q$. Then $(1)$ have the simple form
$$\frac{p}q=\sum_{j=0}^{n-1}\frac{a_j}{x-r_j}\tag{2}$$
Lemma 2: if the coefficients of the polynomials $p$ and $q$ are real then we have that 


*

*if $r_j$ is a real root then all $a_{j,k}$ are real.

*if $r_j$ is complex then $a_{j,k}$ is also complex and exists some root of the same multiplicity $r_h=\bar r_j$ with $a_{h,k}=\bar a_{j,k}$ for each $k$.

From the two lemmas together, after a bit of algebra, we found that we can express the integral of the question as a logarithm more an arc-tangent, that is
$$\frac{x}{x^2+x+1}=\frac12\cdot\frac{2x+1-1}{x^2+x+1}=\frac12\left(\frac{2x+1}{x^2+x+1}-\frac1{x^2+x+1}\right)=\\=\frac12\left(\frac{2x+1}{x^2+x+1}-\frac1{(x+1/2)^2+3/4}\right)=\frac12\left(\frac{2x+1}{x^2+x+1}-\frac43\cdot\frac1{\left(\frac{2x+1}{\sqrt 3}\right)^2+1}\right)=\\=\frac12\left(\frac{2x+1}{x^2+x+1}-\frac2{\sqrt 3}\cdot\frac{2/\sqrt3}{\left(\frac{2x+1}{\sqrt 3}\right)^2+1}\right)$$
Hence
$$\int\frac{x\mathrm dx}{x^2+x+1}=\frac12\ln(x^2+x+1)-\frac1{\sqrt3}\arctan\left(\frac{2x+1}{\sqrt 3}\right)+C$$
A: Let $I = \int^1_{-1} \frac{x}{x^2+x+1} dx$
$2I = \int^1_{-1} \frac{2x + 1 - 1}{x^2+x+1} dx$
$2I = [\ln|x^{2}+x+1|]_{-1}^{1} -\int_{-1}^{1}\frac{1}{x^{2}+x+1}dx$
$2I = \ln3 -\int_{-1}^{1}\frac{1}{(x+\frac{1}{2})^{2}+\frac{3}{4}}dx$
Can you solve it from there?
Edit: In case you get stuck:
Let $x+\frac{1}{2} = \frac{\sqrt{3}}{2}\tan u$
$\Rightarrow dx = \frac{\sqrt{3}}{2}\sec^{2}u$
Lower limit: 
$-1+\frac{1}{2} = \frac{\sqrt{3}}{2}\tan u\Rightarrow \tan u = -\frac{1}{\sqrt{3}} \Rightarrow u = -\frac{\pi}{3}$
Upper limit:
$\frac{3}{2}=\frac{\sqrt{3}}{2}\tan u \Rightarrow u = \frac{\pi}{6}$ 
$2I = \ln3 - \int_{-\frac{\pi}{6}}^{\frac{\pi}{3}}\frac{1}{\frac{3}{4}(\tan^{2}u+1)} \cdot \frac{\sqrt{3}}{2}\sec^{2}u\ du = \ln3 - \int_{-\frac{\pi}{6}}^{\frac{\pi}{3}} \frac{2}{\sqrt{3}}\ du$
$2I = \ln 3 - (\frac{2\pi}{3\sqrt{3}} +\frac{2\pi}{6\sqrt{3}}) = \ln 3 -\frac{\pi}{\sqrt{3}}$
$I = \frac{1}{2}(\ln 3 - \frac{\pi}{\sqrt{3}})$
A: Hint:
Complete the square on the denominator and use $u$-substitution, (place your pointer on the rectangle to see hint)

  $$x^2+x+1 = (x+\frac 12)^2+\frac 34$$
 Then let $u=x+\frac 12$ such that $du = dx$ and $x=u-\frac 12$ to get two integrands in terms of $u$ namely, $$\int \frac u{u^2+\frac 34} - \frac 1{2(u^2+\frac 34)}\;dx$$

switch bounds of integrations into $u$-terms and then use Partial Fraction Decomposition
