f(x)=(1-cosx +sinx)/(1+cosx+sinx)
=[2sin²(x/2)+2sin(x/2)cos(x/2)]/[2cos²(x/2)+2sin(x/2)cos(x/2)]
=2sin(x/2)[sin(x/2)+cos(x/2)]/2cos(x/2)[cos(x/2)+sin(x/2)]
=sin(x/2)/cos(x/2)
=tan(x/2)
f(x)=1+sinx-cosx/1+sinx+cosx
=[(sinx/2+cosx/2)^2-cosx]/[(sinx/2+cosx/2)^2+cosx]
=[(sinx/2+cosx/2)^2-(cosx/2+sinx/2)(cosx/2-sinx/2)]/[(sinx/2+cosx/2)^2+(cosx/2+sinx/2)(cosx/2-sinx/2)]
=[(sinx/2+cosx/2)*2sinx/2]/[(sinx/2+cosx/2)*2cosx/2]
=(sinx/2)/[cosx/2]
=tanx/2
简单是简单,打字实在不方便。