Take (x + cos x)(cos x) − (1 + sin x)(1 − sin x) ÷ (x + cos x)2 to
(x + cos x)(cos x) − (1 − sin2x) / (x + cos x)2 and then to
(x + cos x)(cos x) − (cos2x) / (x + cos x)2 and finally to
[(x + cos x)3(cos x) − cos2x]
---------------------------------------- .
(x + cos x)2