Suppose we have a function $f(x)=\frac{1}{|x-2|+|x-4|}$ with absolute value or box function operator (i.e. greatest integer function.

What is the method of determining maxima and minima for those functions which are not differentiable at every point and how to know if the extremum is at a non-differentiable point ? (for example minima of |x|=0 and |x| is not differentiable at x=0) And can we say that the function reaches maximum or minimum if f(x) tends to infinity or zero? (such as for $\frac{1}{|x-4|}$)


1 Answer 1


In this case you want to write down your function in sections: $$f(x)=\left\{\begin{array}{cc}\frac{1}{(x-2)+(x-4)},&x\geq 4,\\ \frac{1}{(x-2)-(x-4)},& 2\leq x < 4,\\ \frac{1}{-(x-2)-(x-4)},& x<2\end{array}\right.$$

On each interval you can now do your standard method. After that you compare your so found extremas with each other and $f$ evaluated at the boundary of your intervals, i.e. $f(2)$ and $f(4)$.

Edit: Your example $f(x)=\frac{1}{|x-4|}$ for reaching maximum or mininum: Formally speaking this $f$ does not attain its maximum or minimum value. Let us discuss why. $f$ is defined as $f:\mathbb{R}\setminus\{4\}\rightarrow\mathbb{R}$ and maximum value in $z$ for this $f$ would be defined as $$\exists z\in\mathbb{R}\setminus\{4\} \mbox{ such that } \forall x\in\mathbb{R}\setminus\{4\} \mbox{ we have } f(z)\geq f(x)$$ Let us assume such a $z\in\mathbb{R}\setminus\{4\}$ exists. Since $$\lim_{x\rightarrow4}f(x)=\infty$$ we find an $\tilde{x}\in\mathbb{R}\setminus\{4\} $ with $f(z)<f(\tilde{x})$. The same is true in this case for the minimum.

Essentially this is the difference between a supremum and a maximum. A supremum does not need to be attained while a maximum has to be attained by definition. See also https://en.wikipedia.org/wiki/Infimum_and_supremum

  • $\begingroup$ Is there any mathematical direct process? $\endgroup$
    – S R Maiti
    Aug 25, 2017 at 13:19
  • 1
    $\begingroup$ You mean without using some kind of trick connected to the problem? Unfortunately not. You may want to look into global optimization. The question of finding global extrema is a very active field of research in applied math. Here is a wiki link: en.wikipedia.org/wiki/Global_optimization $\endgroup$ Aug 25, 2017 at 13:29
  • $\begingroup$ Just edited my question, adding another question. $\endgroup$
    – S R Maiti
    Aug 25, 2017 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .