Solution:
Key idea: Simplify the terms one group at a time. The second term simplifies once we write sin2y as 1−cos2y and factorise this as (1−cosy)(1+cosy). The last two terms cancel each other exactly.
Step 1 — Simplify the second term.
We write sin2y as 1−cos2y and factorise it as a difference of squares; the factor 1+cosy then cancels.
1+cosysin2y=1+cosy1−cos2y
=1+cosy(1−cosy)(1+cosy)
=1−cosy
Step 2 — Combine the last two terms over a common denominator.
The common denominator of siny1+cosy and 1−cosysiny is siny(1−cosy).
siny1+cosy−1−cosysiny=siny(1−cosy)(1+cosy)(1−cosy)−sin2y
Step 3 — Simplify that numerator.
We multiply out (1+cosy)(1−cosy) and then use sin2y+cos2y=1.
(1+cosy)(1−cosy)−sin2y=1−cos2y−sin2y
=1−(cos2y+sin2y)
=0
So the last two terms together equal 0 (the denominator is non-zero, since siny and 1−cosy are denominators in the question).
Step 4 — Put the pieces together.
We replace the second term by 1−cosy (Step 1) and the last two terms by 0 (Step 3).
LHS=1−(1−cosy)+0
=cosy
This is the right side.
Hence proved: 1−1+cosysin2y+siny1+cosy−1−cosysiny=cosy.