# How do you find local maximum value of f using the first and second derivative tests: f(x)=x+sqrt(2-x)?

Feb 6, 2017

See below.

#### Explanation:

Domain of $f$ is $\left(- \infty , 2\right]$

$f ' \left(x\right) = 1 - \frac{1}{2 \sqrt{2 - x}} = \frac{2 \sqrt{2 - x} - 1}{2 \sqrt{2 - x}}$

$f '$ is undefined at $2$ and is $0$ at $\frac{7}{4}$. So the critical numbers are $2$ and $\frac{7}{4}$.

(Some do not apply the term "critical number" at an endpoint of the domain.)

Using the First Derivative Test

On $\left(- \infty , \frac{7}{4}\right)$ we have $f ' \left(x\right) > 0$ and

on $\left(\frac{7}{4} , 2\right)$, $f ' \left(x\right) < 0$, so $f \left(\frac{7}{4}\right) = \frac{9}{4}$ is a local maximum

and $f \left(2\right) = 2$ is a local minimum.

(Some do not apply the term "local minimum" at an endpoint of the domain. They would disagree with my answer about that.)

Using the Second Derivative Test (for local extrema)

$f ' ' \left(x\right) = - \frac{1}{4 {\sqrt{2 - x}}^{3}}$

$f ' ' \left(\frac{7}{4}\right) < 0$, so $f \left(\frac{7}{4}\right) = \frac{9}{4}$ is a local maximum.

$f ' ' \left(2\right)$ does not exist, so we cannot use the second derivative test at $x = 2$