Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Find the greatest possible value of $5\cos x + 6\sin x$.

I attempted to solve this using graphing, however, the answer appears to be an ugly irrational. Is there a better method of solving this problem?

Thank you.

share|cite|improve this question
That's because the answer is an irrational number... – RecklessReckoner May 3 '14 at 19:15

A simple vector-based approach: you recognize in the expression the dot product $$(5, 6) \cdot (\cos x, \sin x).$$ This product is maximized when the two vectors are parallel and it is then the product of the moduli $$\sqrt{5^2+6^2} \cdot 1.$$

share|cite|improve this answer
This is nice too. – Mark Bennet May 3 '14 at 21:16
This is a really nice solution. Thanks! – math-sd May 4 '14 at 14:52

Hint: Let $\theta$ be an angle whose sine is $\frac{5}{\sqrt{61}}$ and whose cosine is $\frac{6}{\sqrt{61}}$. Then our expression is equal to $$\sqrt{61}\sin(x+\theta).$$

share|cite|improve this answer

There is an ad-hoc solution as shown in other answers.

Anyway, the standard approach is to find the roots of the derivative, $-5\sin x+6\cos x=0$, i.e. $\tan x=\frac{6}{5}$, so that $x=\arctan\frac{6}{5}$ or $\pi+\arctan\frac{6}{5}$.

Plug these values in the objective function.

share|cite|improve this answer
I'm sorry, my solution is not "ad hoc" - I put it as I did to indicate how to do this more generally. One doesn't need calculus to sort out basic trigonometric identities. Sometimes you want to go for $\sin (x-a)$ or $\cos (x \pm a)$. I think you overstate the case for "the standard approach" in elementary work. – Mark Bennet May 3 '14 at 20:54
@Mark: don't take "ad-hoc" as pejorative. – Yves Daoust May 3 '14 at 21:01
No, I don't really. But Inwas trying to indicate a systematic approach (!) – Mark Bennet May 3 '14 at 21:03
Would your approach apply to $5 \log \sin x+ 6x^3$ ? – Yves Daoust May 3 '14 at 21:05
Have a look at the vector-based approach. Pretty compact... :) – Yves Daoust May 3 '14 at 21:12

Here's another way, by Cauchy-Schwarz inequality $$(\cos^2x+\sin^2x)(5^2+6^2)\ge (5\cos x + 6\sin x)^2$$

share|cite|improve this answer

Let $r^2=5^2+6^2=25+36=61$ and $\alpha = \arctan \frac 56$

You will find that $$5\cos x+6\sin x=r(\sin\alpha\cos x+\cos\alpha \sin x)=r \sin (x+\alpha)$$

share|cite|improve this answer
See also Linear combinations of sine and cosine for more details. – MvG May 3 '14 at 21:19
@MvG Great link – Mark Bennet May 3 '14 at 21:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.