You can write y=arctan(sin(x)). Since sin(x) takes values between -1 and 1, y has a range of ±π/4, as long as we confine it to the first quadrant angles. It’s also continuous. You can also work out other relationships, such as sin(y)=sinx/√(1+sin²(x)) or y=arcsin(sin(x)/√(1+sin²(x))). (Strictly y=arctan(sin(x))+πn, where n is any integer.)
You will get the same result if you differentiate implicitly or explicitly.