# Hint needed to show that $a\cos t+b\sin t\leq \sqrt{a^2+b^2}$ for $t\in [0,2\pi)$ [duplicate]

This question already has an answer here:

And that the upper bound is achieved for some choice of $\theta$. This exercise shows up in the Cauchy-Schwarz section of a textbook I am looking through but I don't see how to apply CS to prove. I would prefer a hint towards how to use this ineq. specifically.

Through standard techniques, you can see that the maximum of $$f(t)=a\cos t+b\sin t-\sqrt{a^2+b^2}$$ occurs for $\arctan\frac{a}{b}$ provided $t\ne \frac{\pi}{2},\frac{3\pi}{2}$. Not sure if I can do much from there though.

## marked as duplicate by Arnaud D., Lord Shark the Unknown, Nosrati, mechanodroid, José Carlos SantosSep 25 '17 at 21:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• Suppose you had $ax+by$ and you knew $x^2+y^2=1.$ – zhw. Mar 5 '17 at 4:11

## 4 Answers

Simply imagine that $(a, b)$ and $(\cos{t}, \sin{t})$ are two vectors, $a\cos{t} + b\sin{t}$ being the dot product of them.

• It's C-S exectly! +1. – Michael Rozenberg Mar 5 '17 at 4:20
• @MichaelRozenberg yes, and thanks for the editing! – R. Feng Mar 5 '17 at 5:33

It's just C-S: $$a\cos t+b\sin t\leq |a\cos t+b\sin t|=$$ $$=\sqrt{(a\cos t+b\sin t)^2}\leq\sqrt{(\cos^2t+\sin^2t)(a^2+b^2)}=\sqrt{a^2+b^2}$$

• Wow I feel stupid. Thank you – qbert Mar 5 '17 at 4:17

Note that $\sec^2 x = 1+ \tan^2 x,$ so $\cos \arctan u = 1/\sec(\arctan u) = \frac1{\sqrt{1+ \tan^2 (\arctan u)}} = \frac1{u^2+1}.$

Similarly, $\csc^2 x = 1 + \cot^2 x,$ etc.

Cauchy Schwartz on an arbitrary point and a point on the unit circle.