# Sine and cosine expression

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.

• That's because the answer is an irrational number... – colormegone 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.$$

• 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).$$

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.

• 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$$

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)$$