#### Question

Prove that f(x) = sinx + \[\sqrt{3}\] cosx has maximum value at x = \[\frac{\pi}{6}\] ?

#### Solution

\[\text{We have }, \]

\[f\left( x \right) = \sin x + \sqrt{3}\cos x\]

\[ \Rightarrow f'\left( x \right) = \cos x + \sqrt{3}\left( - \sin x \right)\]

\[ \Rightarrow f'\left( x \right) = \cos x - \sqrt{3}\sin x\]

\[\text { For } f\left( x \right) \text { to have maximum or minimum value, we must have } f'\left( x \right) = 0\]

\[ \Rightarrow cos x - \sqrt{3}sin x = 0\]

\[ \Rightarrow cos x = \sqrt{3}sin x\]

\[ \Rightarrow \cot x = \sqrt{3}\]

\[ \Rightarrow x = \frac{\pi}{6}\]

\[\text { Also }, f''\left( x \right) = -\text { sin } x - \sqrt{3}\cos x\]

\[ \Rightarrow f''\left( \frac{\pi}{6} \right) = - \sin\frac{\pi}{6} - \sqrt{3}\cos\frac{\pi}{6} = - \frac{1}{2} - \sqrt{3}\left( \frac{\sqrt{3}}{2} \right) = - \frac{1}{2} - \frac{3}{2} = - 2 < 0\]

\[\text { So, x } = \frac{\pi}{6} \text { is point of maxima } .\]