Integral from yesterdays test: $\int_0^\pi {{1+\sin^2x}\over{6-\cos^2x+\left|\cos x\right|}} \sin x \cdot x \, dx$ This was the integral we had on the test yesterday:
$$\int_0^\pi {{1+\sin^2x}\over{6-\cos^2x+\left|\cos x\right|}} \sin x \cdot x \, dx$$
None of my friends including me managed to solve it. Does anyone know how to solve this integral? I tried literally everything but couldn't manage to solve it ... By the way, do you think that this integral is way too hard to be on the test? (First year of college, 90 min test )

Let me write $$f(x)={{1+\sin^2x}\over{6-\cos^2x+\left|\cos x\right|}} \sin x$$ and $$I=\int_0^\pi f(x) x\,dx.$$ Since $\sin(\pi-x)=\sin x$ and $\cos(\pi-x)=-\cos x$, we have $f(\pi-x)=f(x)$.  So, making the substitution $u=\pi-x$ in the integral, we have $$I=\int_{\pi}^0f(u)(\pi-u)(-du)=\pi\int_0^\pi f(u)\,du-\int_0^\pi f(u)u\,du=\pi\int_0^\pi f(u)\,du-I$$ and so $$2I=\pi\int_0^\pi f(u)\,du.$$
The identity $f(\pi-x)=f(x)$ furthermore gives that $$\int_0^\pi f(x)\,dx=2\int_0^{\pi/2}f(x)\,dx.$$
So, it suffices to compute the integral $$J=\int_0^{\pi/2}f(x)\,dx$$ and then we will have $I=\pi J$.
To compute $J$, first observe that $\cos x$ is always nonnegative for $x\in[0,\pi/2]$ so we may ignore the absolute value in $f(x)$.  We now make the substitution $u=\cos x$ to get
$$J=\int_1^0\frac{2-u^2}{6-u^2+u}(-du)=\int_0^1\frac{2-u^2}{-(u-3)(u+2)}\,du$$ (here we use the fact that $\sin^2 x=1-\cos^2 x$ to write the numerator in terms of $u$).  Now we use partial fractions to write the integrand as $$1+\frac{7/5}{u-3}-\frac{2/5}{u+2}$$ which we can now integrate straightforwardly to find that $$J=1+\frac{7}{5}(\log2-\log 3)-\frac{2}{5}(\log 3-\log 2)=1+\frac{9}{5}\log\frac{2}{3}.$$
We conclude that $$I=\pi\left(1+\frac{9}{5}\log\frac{2}{3}\right).$$
(For confirmation that I have managed to not make any small mistake, WolframAlpha computes both the integral and my answer to be approximately $0.848741$.)
