# Definite integral (mixture of functions)

I have problem with this integral and I generally don't know how to approach it: $$\int_{-2}^2 (x^4+4x+\cos(x))\cdot \arctan\left(\frac{x}{2}\right)dx$$ I know that I probably have to make some substitution, but really don't know which. Thanks for your help.

HINT:

For even function $f(x)$, $$\int_{-a}^af(x)dx=2\int_0^af(x)dx$$

For odd $$\int_{-a}^af(x)dx=0$$

$$(-x)=x^4,\cos(-x)=\cos x,\arctan\left(-\dfrac x2\right)=-\arctan\dfrac x2$$

$\implies$ if $\displaystyle g(x)=\left(x^4+4\cos x\right)\arctan\frac x2,g(-x)=-g(x)$

If $\displaystyle h(x)=x\cdot\arctan\dfrac x2,h(-x)=h(x)$

So, the given integral reduces to $$2\int_0^24x\cdot\arctan\dfrac x2 dx$$

Using lab bhattacharjee's result. The integral can be solven by using integration by parts. Let \begin{align} u=\arctan\frac{x}{2}\qquad\rightarrow\qquad du=\frac{2\,dx}{x^2+4}\qquad\text{and}\qquad dv=x\,dx\qquad\rightarrow\qquad v=\frac{1}{2}x^2 \end{align} Then \begin{align} 8\int_0^2x\arctan\frac {x}{2}\, dx&=\left.4x^2\arctan\frac{x}{2}\right|_0^2-8\int_0^2 \frac{x^2}{x^2+4}\,dx\\ &=4\pi-8\int_0^2 \frac{x^2+4-4}{x^2+4}\,dx\\ &=4\pi-8\int_0^2 \,dx+16\int_0^2 \frac{2}{x^2+4}\,dx\\ &=4\pi-16+16\, \left.\arctan\frac{x}{2}\right|_0^2\\ &=4\pi-16+4\pi\\ &=8\pi-16 \end{align}