# Find the area bounded by two functions $f(x)=(\cos^{-1}|\cos x|)^2$ and $\cos^{-1}|\cos x|$ for the ordinates $|x|=2\pi$

Find the area bounded by two functions $f(x)=(\cos^{-1}|\cos x|)^2$ and $\cos^{-1}|\cos x|$ for the ordinates $|x|=2\pi$

I tried to solve this problem but could not get correct answer.
I drew their graphs.

Area=$\int_{0}^{1}(x-x^2)dx+\int_{\pi-1}^{\pi}((\pi-x)-(\pi-x)^2)dx$

and i got $-\pi^2+2\pi$ but the correct answer is $\frac{\pi^3+\pi+8}{6}$

where have i done wrong?Please guide me.

it seems that one should calculate in total $$8\biggl[\int_0^1 x-x^2\,dx+\int_1^{\pi/2} x^2-x\,dx\biggr].$$ Doing so, I end up with $$\frac{\pi^3}{24}-\frac{\pi^2}{8}+\frac{1}{3}.$$ But I have probably misunderstood something?