(1+sinθ+cosθ)/(1+sinθ-cosθ)=[2sin(θ/2)cos(θ/2)+2cos²(θ/2)]/[2sin(θ/2)cos(θ/2)+2sin²(θ/2)]=cos(θ/2)/sin(θ/2).
(1-cosθ+sinθ)/(1+cosθ+sinθ)=[2sin(θ/2)cos(θ/2)+sin²(θ/2)]/[2sin(θ/2)cos(θ/2)+2cos²(θ/2)]=sin(θ/2)/cos(θ/2).
所以,原式=cos(θ/2)/sin(θ/2)+sin(θ/2)/cos(θ/2)=[cos²(θ/2)+sin²(θ/2)]/[sin(θ/2)cos(θ/2)]=2/sinθ.