# How many points of maximum/minimum in the range $[-2,2]$?

An exercise asks me to find the points of maximum and minimum of the following function. $$f(x)=(x^2-2x)e^x$$ in the following range $$[-2,2]$$ After finding the first derivative $$f^1(x)=e^x(x^2-2)$$ I pose greater than zero, then i find the when primitive function waxes and wanes with the respective maximum points is minimal. $$max \to -\sqrt{2}$$ $$min \to \sqrt{2}$$ Now my question is: the points of maximum and minimum in the range $[-2,2]$ are only those two, or being limited function are four? (also including the two extreme points of the interval $[-2$ and $2]$). The 2 end points f(-2) and f(2) do not count as local maximum or minimum, because the maximum and minimum at $-\sqrt{2}\text{ and }\sqrt{2}$ is included in the range [-2,2]

• and if the range was $[-2,1]$ I would still have a maximum and a minimum? – user12 Dec 30 '15 at 23:12
• so they dont even count as a maximum or minimum local, right? – user12 Dec 30 '15 at 23:15
• – Steve Dec 30 '15 at 23:17
• therefore to be considered a maximum for all purposes must first grow and then decreases? if the range is over, it is therefore not a maximum / minimum (even local)? – user12 Dec 30 '15 at 23:19
• The x=sqrt(2) is global minimum and x=-sqrt(2) is local maximum, there also exist a global maximum at infinity. – Steve Dec 30 '15 at 23:26

It really seems mean to consider the end points as extrema but technically they could be.

$f'(x) = (x^2 - 2x)e^x + e^x(2x - 2) = e^x(x^2 - 2)$

$f^2(x) = (x^2 - 2 + 2x)e^x$.

$f'(x) = 0 \implies x = \pm \sqrt{2}$

$f''(\sqrt 2) > 0$ so a min at $f(\sqrt 2) = (2 - 2\sqrt 2)e^{\sqrt 2}$

$f''(-\sqrt 2) < 0$ so a max at $f(-\sqrt 2) = 2 + 2\sqrt 2)/e^{\sqrt 2}$

$f(2) = 0$ so not a max or a min.

$f(-2) = 8/e^2$ which is less than $f(-\sqrt 2)$ (which is a local max) and being positive is not a min.

So the end points are not more or less than the local max/mins so there are only two max/mins and they are not the end points.

The sign chart for your derivative looks like this

 +++++++-------------------+++++++++++
-2  -sqrt(2)            sqrt(2)      2


This shows a local maximum at $-\sqrt{2}$ and a local minimum at $\sqrt{2}$. You might also have endpoint extrema as well. On the left it appears you have a local endpoint minimum and on the right a local endpoint maximum.

• so then they should be taken as maximum and minimum? – user12 Dec 30 '15 at 23:07
• Yes. They are endpoint extrema. Consider this problem. Take a piece of wire and bend it into a square an a circle. Find the minimum and maximum total area enclosed by the square and the circle. Note the importance of the endpoint maximum. – ncmathsadist Dec 30 '15 at 23:44