## Maximum of a trigonometric function

This is related to my previous post. I am having trouble to get the maximum of the following trigonometric function:

$$\cos^m\theta_1(c\cos^n\theta_2+s\sin^n\theta_2)+\sin^m\theta_1 ( c\sin^n\theta_2+s\cos^n\theta_2)$$

Here $$m,n\ge2 \mbox{ are fixed positive integers and } c,s$$ are fixed positive reals with $$c^2+s^2=1$$. The maximum is to be carried out w.r.t. $$\theta_1,\theta_2$$ in the range $$0\le\theta_1,\theta_2\le\frac{\pi}{2}$$ In my trying, I got the maximum to be max(c,s), but I fear may be I have done some mistake. I got the result by differentiating w.r.t. $$\theta_1,\theta_2$$ and vanishing them....but I have ignored the case when $$\cos\theta_1\cos\theta_2\sin\theta_1\sin\theta_2\ne0$$. Can anybody help me, please.

Can I say that the function is all time differentiable within its closed and compact domain (the rectangle), the maximum should be attained on boundary?
 PhysOrg.com science news on PhysOrg.com >> King Richard III found in 'untidy lozenge-shaped grave'>> Google Drive sports new view and scan enhancements>> Researcher admits mistakes in stem cell study
 Plotting in mathematica with different values, I can not find an exception. But the reasoning of closed, compact domain can not be applied, because though the domain is convex, the function is itself not a convex one. However, we can split the domain such that in each part, the function remains monotonic.
 Oh, finally I got an answer to this question...the proof is a handy one (according to me, of course!). The answer is indeed correct. Since $$\cos\theta_1\cos\theta_2\sin\theta_1\sin\theta_2\ne0, \cos\theta_1,\cos\theta_2,\sin\theta_1,\sin\theta_2<1.$$ so $$\cos^m\theta_1(c\cos^n\theta_2+s\sin^n\theta_2)+ \sin^m\theta_1 ( c\sin^n\theta_2+s\cos^n\theta_2)$$ $$\le \cos^2\theta_1(c\cos^2\theta_2+s\sin^2\theta_2)+ \sin^2\theta_1 ( c\sin^2\theta_2+s\cos^2\theta_2)$$ $$\le\frac{c+s}{2}$$ $$<\max\{c,s\}$$ Regards.