your derivative is correct.

now just plug in x = π/2 to get the slope
remember that tan(π/2) is undefined, BUT
cot (π/2) = cos(π/2) / sin(π/2) = 0/1 = 0
so slope = -csc^2 (π/2) = 2

I calculated and got -1 as the slope. Can you please explain how you got 2 for the slope?

you are correct at -1

I made an error, (shouldn't do stuff in my head)
I think I was taking csc^2 (45°) , π/2 = 90°, not 45°
my bad