You can
put this solution on YOUR website!It's not exactly an identity as for x=0 the LHS is not evaluable but the RHS is. Similar for x=pi.
Let S=sin, C=cosine then the first thing I will do is multiply the whole thing by SS(C+1). This gives
-(C+1)(2SC+C-2S-1)=(2S+1)SS
expanding all the brackets gives
-(2SCC + CC - 2SC -C +2SC + C - 2S - 1) = 2SSS + SS
With some cancellations
-(2SCC + CC - 2S - 1) = 2SSS + SS
Now CC + SS =1, so CC = 1-SS, substituting this in gives
-(2S - 2SSS + 1 - SS - 2S - 1) = 2SSS + SS
From here it is just trivial cancellation to see that both are the same.