# Maximum and minimum in a points of discontinuity

I want calculate the maximum and minimum of the following function $$f(x)=\Biggl\{ \begin{array}{c} \cos x \ \ \ \ \ x\in(0,\pi] \\ \sin x \ \ \ x\in[-\pi,0] \end{array}$$ The points $x=-\pi/2$, $x=\pi$ are absolute minimum. Instead, the point $x=-\pi$ is a relative maximum. My question is: what happens in $x = 0$? It is not an absolute maximum. It can be a relative maximum?

Thank you very much.

-
 what is your definition of "relative maximum"? – Adam Rubinson Dec 13 '12 at 14:26 "the largest value that the function takes at a point either within a given neighborhood" – Mark Dec 13 '12 at 14:29 That doesn't make sense – Adam Rubinson Dec 13 '12 at 14:31 Is the definition on Wikipedia. – Mark Dec 13 '12 at 14:45 -1 (as usual) for Wikipedia (the full statement there is poorly written). – David Mitra Dec 13 '12 at 14:54

No, you can draw pictures to see this, or just note that when $\pi>x>0$, $cos x>0$, when $-\pi<x<0$, $sin x<0$, and $f(0)=0.$

-