Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Be $I=[-2,2]\subset \mathbb{R}$ and a function $f:I \Leftarrow \mathbb{R} $ (continuous and differentiable on $I$)

$$ f(x) = \begin{cases} xe^{x-1} & \text{if $x \leq 0$}\\ xe^{1-x} & \text{if $x>0$ } \end{cases}$$

Determine the local & global maximum and minimum points of $f$ on $I$.

1) For $x\leq 0:$
$\Leftrightarrow x=-1$

So that there is a local minimum point for x=-1.
$f(-1)=-e^{-2}<-2e^{-3}=f(-2) \Leftrightarrow f(-1)$is also the global minimum point.

2) For $x>0:$
$\Leftrightarrow x=1$

So that there is a local maximum point for x=1.
$f(1)>f(2) \Leftrightarrow f(1)$is also the global maximum point.

My questions:

1) Is this correct?

2) and is it enough or do I also have to regard the limits for -2 and 2 (or is this unnecessary by saying the function is continuous & differentiable on I)?

share|cite|improve this question
up vote 1 down vote accepted

The solution is not entirely correct. For example, it contains the assertion that $f'(x)=(1+x)e^{x-1}$ for $x\le 0$.

This is not quite true. The derivative is correct for $x\lt 0$. But $f$ is not differentiable at $x=0$. You will be able to quickly check that $$\lim_{x\to 0^-}\frac{f(h)-f(0)}{h} \ne \lim_{x\to 0^+}\frac{f(h)-f(0)}{h},$$ so the two-sided limit of the difference quotient does not exist.

Now in fact there is no real "trouble" at $0$, we do not have a local max or min at $0$. But one has to say that, with some explanation, since we cannot use the derivative criterion.

Remark: Perhaps one could get away with the mistake about the derivative, if the (incorrect) assertion that the function is differentiable was part of the problem statement.

share|cite|improve this answer
Ok, is it possible to have a global max or min in point which is not differentiable? – Phil Jun 27 '13 at 6:48
Oh yes! The standard simple example is $f(x)=|x|$, global min at $0$, not differentiable there. One can change it a bit so that the resulting function has derivative $0$ at some places, but global min is still at a point of non-differentiability. – André Nicolas Jun 27 '13 at 6:58
Differentiability has nothing to do with something being global max or min, a global min occurs at a point $a$ if $f(a) \leq f(x) \ \forall x \in D$ where $D$ is the domain of your function. – firemind Jun 27 '13 at 16:25

That's correct. You don't have to take any limits, you already evaluated your function at the boundary points of your domain and confirmed that they're not global max or global min.

On the other hand, your boundary points are local extrema: -2 is a local max and 2 is a local min. Why is that? Because your function is decreasing strictly between $[-2,-1)$ and $(1,2]$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.