1. The problem statement, all variables and given/known data

I can't seem to figure out how to prove that (cscx - cotx)^2 = (1-cosx)/(1+cosx).

2. Relevant equations

I believe I just need to do appropriate substitution using compound angle formulas, double angle formulas, etc...

3. The attempt at a solution

I got as far as this

1 + cot^2x - 2(1/tanx)(1/sinx) + cot^2x = (1-cosx)/(1+cosx)

Can anyone help me figure this out? Thanks in advance!!