By converting into parametric equations,
{x(θ)=r(θ)cosθ=cos2θcosθy(θ)=r(θ)sinθ=cos2θsinθ
By Product Rule,
x'(θ)=−sin2θcosθ−cos2θsinθ
x'(π2)=−sin(π)cos(π2)−cos(π)sin(π2)=1
y'(θ)=−sin2θsinθ+cos2θcosθ
y'(π2)=−sin(π)sin(π2)+cos(π)cos(π2)=0
So, the slope m of the curve can be found by
m=dydx∣θ=π2=y'(π2)x'(π2)=01=0
I hope that this was helpful.