This seems really simple but I can't get it $$\int_0^{ \pi/2} \cos^2 x \,dx$$
$u = \cos^ 2 x$, $du = -2 \cos x \sin x$
$dv = dx$, $v = x$
$$x \cos x + 2 \int x \cos x \sin x$$
$t = \sin x$, $dt = \cos x dx$
$$2\int x \cos x t \, dt/ \cos x$$
$$2\int xt \, dt$$
$$2\int xt \, dt$$
This is where I am stuck and I do not know what to do. I guess I can do the integration by parts again but it doesnt seem to help. I do not know if it is legal to work with two variables like that.