Let $a$ and $b$ be real numbers. Find the maximum value of $a \cos \theta + b \sin \theta$ in terms of $a$ and $b.$
Consider the identity
\(\displaystyle R\cos(\theta - \alpha) \equiv R\cos\theta\cos\alpha + R\sin\theta\sin\alpha.\)
Equating coefficients with the given expression,
\(\displaystyle R\cos\alpha = a, \\ R\sin\alpha = b.\)
Solving for
\(\displaystyle R \; \text{ and }\; \alpha,\\ R^{2}=a^{2}+b^{2} \; \text{ and }\tan\alpha = b/a,\)
so
\(\displaystyle a\cos\theta + b\sin\theta \equiv \sqrt{a^{2}+b^{2}}\cos(\theta - \alpha)\) where \(\displaystyle \alpha = \arctan(b/a).\)
Max will be \(\sqrt{a^{2}+b^{2}} \; \text{ when } \theta = \alpha.\)