Both the relative maximum and relative minimum have a slope, and, thus, derivative of zero. A useful thing is to find the zero's of the derivative graph, and make a sign chart. When a function stops increasing, and starts decreasing - you know it's the maximum (derivative switches from positive to negative). When the function stops decreasing and starts increasing - you know its the rel. minimum (derivative changes from negative to positive). Also, ALWAYS check at the endpoints, if you have an interval for your function. Also, remember that in periodic functions there are a lot of maximums and minimums, so when you write the x-values of them, make them periodic also, like [tex]\frac{\pi}{2}+\pi x[/tex], or something like that.
Hope I didn't confuse you too much.