This will help:
int(1/(1 + x^2)) = arctan(x)
Let u = cos(x)
Then,
du = -sin(x)
-du = sin(x)
Factor out the -1
-int(1/(1 + u)^2)du
-arctan(u)du
Thus, substitute in for u:
-arctan(cos(x)) + C, but you're given the limits. And thus,
-arctan(cos(Pi/2)) - [-arctan(cos(0))]
0 - (-Pi/4)
= Pi/4