sin(x) is a continous function, cos(x) is a continous function, so you only need to verify that at , . Why is this? Basically even though is not in the domain of sin(x), Since sin(x) is continous

In a gist, if you come at from the left, it should be the same as if you come at it from the right. The only point at which problem can arise is at , which is why you need to check there.