Respuesta :

Set [tex]y=\pi x[/tex], so that [tex]\dfrac{\mathrm dy}\pi=\mathrm dx[/tex] and the integral is equivalent to

[tex]\displaystyle\int_0^{1/2}x\cos\pi x\,\mathrm dx=\frac1{\pi^2}\int_0^{\pi/2}y\cos y\,\mathrm dy[/tex]

Now integrate by parts, setting

[tex]u=y\implies\mathrm du=\mathrm dy[/tex]
[tex]\mathrm dv=\cos y\implies v=\sin y[/tex]

So you have

[tex]\displaystyle\frac1{\pi^2}\int_0^{\pi/2}y\cos y\,\mathrm dy=\frac1{\pi^2}y\sin y\bigg|_{y=0}^{y=\pi/2}-\frac1{\pi^2}\int_0^{\pi/2}\sin y\,\mathrm dy[/tex]
[tex]=\displaystyle\frac{\frac\pi2\sin\frac\pi2-0}{\pi^2}+\frac1{\pi^2}\cos y\bigg|_{y=0}^{y=\pi/2}[/tex]
[tex]=\displaystyle\frac1{2\pi}+\frac{\cos\frac\pi2-\cos0}{\pi^2}[/tex]
[tex]=\displaystyle\frac1{2\pi}-\frac1{\pi^2}[/tex]