Yes $ csc theta = sqrt { frac {p + q} {p-q}} or $ p> q> 0 $then $ | cot ( frac { pi} {4} + frac { theta} {2}) | $ is equal to:

What I've tried

Since, $$ cot ( frac { pi} {4} + frac { theta} {2}) = sqrt { frac {1+ cos ( frac { pi} {2} + theta) } {1- cos ( frac { pi} {2} + theta)}} $$

$$ = sqrt { frac {1- sin theta} {1 + sin theta}} $$

$$ = sqrt { frac {1- frac {p-q} {p + q}} {1+ frac {p-q} {p + q}}}} $$

$$ = sqrt { frac {q} {p}} $$

That's what I have but the answer is $ sqrt { frac {p} {q}} $. I do not know where I did wrong. Please help! Thank you!