# Question:Command Extrempoints

## Question:Command Extrempoints

Maple 2019

Question about using the command „ExtremPoints“

I am using Maple 2019.

Using the command ExtremPoints I got different list when defining the function over a closed intervall piecewise or with f(x), x=a..b.

Maple desciption states:
ExtremePoints(f(x), x = a..b) command returns all extreme points of f(x) in the interval [a,b] as a list of values.

An extreme point is defined as any point which is a local minimum or maximum, which includes any finite end points.

So I expected, Maple returns the same list, independend of how the same function is defined (see example below). Instead: with the piecewise definition Maple returns as extrempoints only the local extrempoints without the finite endpoints.
Defining the same function with f(x),x=a..b Maple returns the list with local minimum or maximum, which includes any finite end points.

Example:

f := x -> piecewise(-1 <= x and x <= 2, x^2, undefined);

Return:  ExtremePoints(f(x));

[0]

g := x -> x^2

ExtremePoints(g(x), x = -1 .. 2);

[-1, 0, 2]

﻿