# How do you find the maximum value of f(x)=2sin(x)+cos(x)?

Sep 1, 2016

$\sqrt{5}$.
Range is $\left[- \sqrt{5} , \sqrt{5}\right]$-

#### Explanation:

f'=2 cos x - sin x = 0, when 2 cos x = sin x that gives

x = arc tan 2. The principal value is in Q1. Indeed, there are general

values in Q1 and Q3.

$f ' ' = - 2 \sin x - \cos x < 0$, for Q1 values and $> 0$

for Q3 values, as both sin x and cos x are negative in Q3.

The maximum is obtained when tan x = 2, with x in Q1. And this is

2sin x + cos x , with tan x = 2

$= 2 \left(\frac{2}{\sqrt{5}}\right) + \frac{1}{\sqrt{5}}$

$= \frac{5}{\sqrt{5}}$

$= \sqrt{5}$.

Of course, the minimum is $- \sqrt{5}$.

Alternative method sans differentiation:

$f = \sqrt{5} \left(\left(\frac{2}{\sqrt{5}}\right) \sin x + \left(\frac{1}{\sqrt{5}}\right) \cos x\right)$

$= \sqrt{5} \sin \left(x + \alpha\right)$, where

$\sin \alpha = \frac{2}{\sqrt{5}} \mathmr{and} \cos \alpha = \frac{1}{\sqrt{5}}$

$M a x f = \sqrt{5} \max \sin \left(x + \alpha\right)$

$= \sqrt{5} \left(1\right)$'