First realize that the functions you are dealing with are the cos/sin functions. Do the following (i haven't specified an interval):
1) Differentiate the function, i.e. find r'(x)
2) Solve the equation r'(x)=0. You may get several x-values, depending on the interval you are considering.
3) Find r'(x) for values greater and smaller than the x value found in 2). From the found r'(x) in this part you can establish where the function increases and where it decreases.
4) Hence if the function increases up until x=k and then starts decreasing you'll know that at x=k you have the maximum function-value.