# How do you find the maximum value of f(x) = sinx+cosx?

Oct 30, 2016

#### Explanation:

The x coordinates of extrema can be found by, computing the first derivative, setting that equal to zero, and then solving for x:

Compute the first derivative:

$f ' \left(x\right) = \cos \left(x\right) - \sin \left(x\right)$

Set equal to zero:

$0 = \cos \left(x\right) - \sin \left(x\right)$

Solve for x:

$\cos \left(x\right) = \sin \left(x\right)$

$1 = \sin \frac{x}{\cos} \left(x\right)$

$1 = \tan \left(x\right)$

$x = {\tan}^{-} 1 \left(1\right)$

$x = \frac{\pi}{4}$

Because the tangent function has a period of $\pi$, the value, 1, repeats at every integer multiple of $\pi$:

$x = \frac{\pi}{4} + n \pi$ where $n = \ldots , - 3 , - 2 , - 1 , 0 , 1 , 2 , 3 , \ldots$

To determine whether this is a maximum, perform the second derivative test, using one of the values:

$f ' ' \left(x\right) = - \cos \left(x\right) - \sin \left(x\right)$

Evaluate at $\frac{\pi}{4}$

$f ' ' \left(\frac{\pi}{4}\right) = - \cos \left(\frac{\pi}{4}\right) - \sin \left(\frac{\pi}{4}\right) = - \sqrt{2}$

The value is a negative, therefore, we have found a maximum.