Answer
$$ \frac{-2}{\pi^2 } $$
Work Step by Step
Given $$\int_{0}^{1} x \cos (\pi x) d x$$
Let
\begin{align*}
u&= x\ \ \ \ \ \ \ \ \ dv=\cos (\pi x)dx\\
du&=dx\ \ \ \ \ \ \ \ v=\frac{1}{\pi} \sin (\pi x)
\end{align*}
Then
\begin{align*}
\int_{0}^{1} x \cos (\pi x) d x&= \frac{x}{\pi} \sin (\pi x)\bigg|_{0}^{1}-\frac{1}{\pi } \int_{0}^{1} \sin (\pi x) d x \\
&= \frac{x}{\pi} \sin (\pi x)+\frac{1}{\pi^2 } \cos (\pi x)\bigg|_{0}^{1}\\
&= \frac{-2}{\pi^2 }
\end{align*}