Study of function $f(x)=\ln(2-|x|)$

35 Views Asked by At

I was studying the function $f(x)=\ln (2-|x|)$ because I have to find its extrema and its inverse image. The domain is $x\in(-2,2)$ and we have that $$\lim_{x\to -2^+} \ln (2-|x|)=\lim_{x\to 2^-} \ln (2-|x|)=-\infty$$ Now I would like to find the extrema with the derivative, but for $x\in(-2,2)$ such that $x\ne0$ it is $$f'(x)=-\frac{\text{sgn}(x)}{2-|x|}$$ And it is $f'(x)\geq0$ if $x\in (-2,0)$ and negative if $x\in(0,2)$; so I am tempted to say that $f$ reaches at $x=0$ its maximum, but $|x|$ is not derivable in $x=0$. How can I solve this? In general, how can i proceed when there are modulus in finding the extrema of a function?

If it is correct then $\ln 2$ is a maximum and being $\ln(2-|x|)=0\Leftrightarrow x=\pm 1$ I deduce that $f^{-1} ((-\infty,0])$ is $(-2,-1] \cup [1,2)$.

Thanks.

1

There are 1 best solutions below

2
On BEST ANSWER

The function $ f $ is even thus we will study it at $ [0,2).$

For $ x\in (0,2) $,

$$f(x)=\ln(2-x); \;\; f'(x)=\frac{1}{x-2}<0$$

thus, $ f $ is strictly decreasing at $ (0,2)$ and continuous at $ x=0$ therefore its maximum is $ M=f(0) $ attained at $ x=0$ because of the continuity.

If $ f $ was differentiable at $ x=0$ , it will be continuous.

If $ f$ was not continuous at $ 0 $, the maximum would be $$M= \max(f(0),\lim_{x\to 0^+}f(x))$$