# How do you find the local extrema for f(x) = x - ln(x) on [0.1,4]?

Jul 12, 2016

Local Minima $= f \left(1\right) = 1.$

Fun. $f$ can not have Local Maxima.

#### Explanation:

Given fun. $f \left(x\right) = x - \ln x , x \in \left[0.1 , 4\right] .$

We recall that for local extrema, i.e., maxima/minima, $\left(i\right) f ' \left(x\right) = 0 , \left(i i\right) f ' ' \left(x\right) < 0$ for maxima, &, $f ' ' \left(x\right) > 0$ for minima.

Now, $f ' \left(x\right) = 0 \Rightarrow 1 - \frac{1}{x} = 0 \Rightarrow x = 1 \in \left[0.1 , 4\right]$

$f ' \left(x\right) = 1 - \frac{1}{x} \Rightarrow f ' ' \left(x\right) = 0 - \left(- \frac{1}{x} ^ 2\right) = \frac{1}{x} ^ 2 \Rightarrow f ' ' \left(1\right) = 1 > 0.$

Therefore, f has a local minima at $x = 1$, and it is $f \left(1\right) = 1 - \ln 1 = 1 - 0 = 1.$

Since, $f ' ' \left(x\right) = \frac{1}{x} ^ 2 > 0 , \forall x \in \left[0.1 , 4\right]$, f can not have any local maxima.