Sin(pi/4)=cos(pi/4)=sqrt(2)/2
tg(x-pi/4)=sin(x-pi/4)/cos(x-pi/4)=(sin(x)cos(pi/4)-cos(x)sin(pi/4))/(cos(x)cos(pi/4)+sin(x)sin(pi/4))=
=(sin(x)-cos(x))/(sin(x)+cos(x))
tg(x+pi/4)=(sin(x)cos(pi/4)+cos(x)sin(pi/4))/(cos(x)cos(pi/4)-sin(x)sin(pi/4))=
=(sin(x)+cos(x))/(cos(x)-sin(x))
tg(x-pi/4)-tg(x+pi/4)=(sin(x)-cos(x))/(sin(x)+cos(x))+(sin(x)+cos(x))/(sin(x)-cos(x))=
=((sin(x)-cos(x))^2+(sin(x)+cos(x))^2)/(sin^2(x)-cos^2(x))=
=-(2*sin^2(x)+2*cos^2(x))/(cos^2(x)-sin^2(x))=-2/cos(2x)