We know that,
cos(90−θ)=sinθ
sin(90−θ)=cosθ
tan(90−θ)=cotθ
=sin(90∘−(40∘−θ))−cos(40∘−θ)+
tan(90∘−89∘)tan(90∘−80∘)tan(90∘−70∘)tan70∘tan80∘tan89∘
=cos(40∘−θ)−cos(40∘−θ)+cot89∘cot80∘cot70∘tan70∘tan80∘tan89∘
We have cotθ=1tanθ