If tan(x) = −40/9 and x is in quadrant IV, then it means that
the opposite leg is 40 units, the adjacent leg is 9 units and the hypotenuse is = = 41 unit.
It implies that cos(x) = .
Next, use the formulas for half argument
= = = = ;
= = = = ;
= .