(tanx+cotx)cos^2x
=(sinx/cosx+cosx/sinx)cos²x
=(sin²x+cos²x)*cos²x/(sinxcosx)
=1*cos²x/sinxcosx
=cosx/sinx
=cotx