what is the integral of $\int x\cos^2(\pi x)$ I have a function $f(x)=x\cos^2(\pi x)$ 
I'm asked to find the size of the aria  that is trapped between
the function $f(x)$ and x axis between [0,1.5]
$\int_0^\frac{3}{2} x\cos^2(\pi x)$
my attempt:
I know that S=$\int_0^\frac{1}{2} x\cos^2(\pi x)$+ $\int_\frac{1}{2}^\frac{3}{2} x\cos^2(\pi x)$
I cant succeed in finding the integral of the function I tried finding the integral with (integral by parts method) and by (assignment method) with no result
I'm stuck at this question pleas help
 A: You could try to use $cos^2(\pi x) = \frac{cos(2\pi x) + 1}{2}$ before applying integration by parts.
A: The answer is $\frac{9}{16}-\frac{1}{4\pi^{2}}$.
Let $f: x\mapsto x\cos^{2}(\pi x)$ and $\displaystyle I=\int_{0}^{3/2}f(x){\rm d}x$. The function $f$ is continuous on $[0;3/2]$ so $I$ there exist and is finite.
Note that $$\forall x\in \mathbb{R}:\quad \cos^{2}(\pi x)=\frac{1}{2}\left(\cos (2\pi x)+1\right).$$
Then,
\begin{eqnarray*}
\int x\cos^{2}(\pi x){\rm d}x&=&\frac{1}{2}\int x(\cos(2\pi x)+1){\rm d}x\\
&=& \frac{1}{2}\int x\cos 2\pi x {\rm d}x+\frac{1}{2}\int {\rm d}x\\
&\overset{{\rm IBP}}{=}&\frac{x\sin 2\pi x}{4\pi}-\frac{1}{4\pi}\int \sin 2\pi x{\rm d}x+\frac{x^{2}}{4}\\
&\overset{t\mapsto 2\pi x}{=}&\frac{x\sin 2\pi x}{4\pi}-\frac{1}{8\pi^{2}}\int \sin t{\rm d}t+\frac{x^{2}}{4}\\
&=&\frac{\cos t}{8\pi^{2}}+\frac{x\sin 2\pi x}{4\pi}+\frac{x^{2}}{4}+C\\
&=&\frac{2\pi x(\pi x+\sin(2\pi x))+\cos(2\pi x)}{8\pi^{2}}+C
\end{eqnarray*}
Therefore,
$$\color{red}{\boxed{\int_{0}^{3/2}x\cos^{2}(\pi x){\rm d}x=\frac{9}{16}-\frac{1}{4\pi^{2}}\approx 0.537}}.$$
