worry about that possibility). Then cos(x)<0, and x is in the second
quadrant. In the first quadrant sin(x)=cos(x) means x=pi/4 (that is 45
degrees), so here x =pi - pi/4 = 3 pi/4 (that is 135 degrees).
Now suppose that sin(x)<0, then cos(x)>0 and we are in the fourth quadrant, and so x=-pi/4 (that is -45 degrees which is also +315 degrees).