text: tan(x+pi/2)=sin(x+pi/2) / cos(x+pi/2)\n\nsin(x+pi/2)=sinx cos(pi/2) + sin(pi/2) cosx= cosx\ncos(x+pi/2)=cosx cos(pi/2) - sin(pi/2)sinx= -sinx\nPlug these two results to the above formula, you have\n\ntan(x+pi/2)=cosx/(-sinx)= -cotgx