Clarifying definition of maximum/minimum point Can a point be considered maximum/minimum if the graph ends at that point?
Consider the following image.

Point A is a typical maximum point. At that point, $\frac{dy}{dx}= 0$ and $\frac{d^2y}{dx^2} < 0$.
Now consider this image.

What about Point B?
At Point B, both the conditions $\frac{dy}{dx}= 0$ and $\frac{d^2y}{dx^2} < 0$ are also fulfilled. Yet, we don't usually think of it as a "maximum" point. Is it actually one? Am I missing something?
 A: First, point B is indeed a maximum point.  The definition of "maximum" can be accurately paraphrased as "all nearby points on the graph are no higher than this one".
However, neither $\frac{dy}{dx}$ nor $\frac{d^2y}{dx^2}$ are defined at that point.  What you do have instead are one-sided derivatives (first and second), which are not the same as standard derivatives.  The one-sided first derivative is indeed zero.
Note: the second derivative of the first graph, and one-sided second derivative of the second graph, does not appear to be $0$, rather negative.
A: I think the notion of Extreme Value Theorem is relevant here. The theorem says that on a closed interval (or a compact set), a continuous function takes its maximum and minimum value at either a point where the derivative is zero, or at the edges of the interval.
Note that in your second example, your maximum satisfies the second condition for the EVT, rather than the first. This is because at these points, since there are no neighborhoods around these points upon which the function is defined, the notion of derivative can't be defined either (there are notions of one-sided derivatives too, but that's not particularly relevant). So, the fact that its a maximum has less to do with its derivative, and more to do with the nature of the domain of the function.
A: First some background -
In rigorous mathematics (read, real analysis, in this context), there are various 'kinds' of closely related definitions of maxima / minima and maximum / minimum points. It might help to take a recap of these as defined for intervals-

*

*Local minima -
A point $ x_0 $ in an interval, $ \mathbb{I} \subset \mathbb{R} $, is said to be a local maxima of a function $ f : \mathbb{I} \rightarrow \mathbb{R}$ if there exists an $ \epsilon $- neighborhood, $ V_\epsilon = ( X_0 - \epsilon , x_0 + \epsilon ) $ of $ x_0 $, such that $ f(x_0) \geq f(x) \forall x \in V_\epsilon \cup \mathbb{I}$.
This definition implies that $({df \over dx})_(x_0) = 0$, when the function is continuous and differentiable over the interval.


*Local minima -
A point $ x_0 $ in an interval, $ \mathbb{I} \subset \mathbb{R} $, is said to be a local minima of a function $ f : \mathbb{I} \rightarrow \mathbb{R}$ if there exists an $ \epsilon $- neighborhood, $ V_\epsilon = ( X_0 - \epsilon , x_0 + \epsilon ) $ of $ x_0 $, such that $ f(x_0) \leq f(x) \forall x \in V_\epsilon \cup \mathbb{I}$.
This definition is equivalent to $({df \over dx})_(x_0) = 0$, whenever the derivative is differentiable over the interval.


*Global maxima -
A point $ x_0 $ in an interval, $ \mathbb{I} \subset \mathbb{R} $, is said to be a global maxima of a function $ f : \mathbb{I} \rightarrow \mathbb{R}$, if  $ f(x_0) \geq f(x) \forall x \in \mathbb{I} $.
This definition is equivalent to saying that $ f(x_0) $ is the largest value taken by $ f $ in that interval.


*Global minima -
A point $ x_0 $ in an interval, $ \mathbb{I} \subset \mathbb{R} $, is said to be a global minima of a function $ f : \mathbb{I} \rightarrow \mathbb{R}$, if  $ f(x_0) \;eq f(x) \forall x \in \mathbb{I} $.
This definition is equivalent to saying that $ f(x_0) $ is the smallest value taken by $ f $ in that interval.
The point $ x_0 $ is called the maximum / minimum of $ f $, as the case may be.
These definitions can be extended tr the cases where $ \mathbb{I} $ is a non-interval, and a singleton, but those cases do not concern us here.

Now, for the answer -
Note that the definitions do not put any restriction agaibst our point being at the end - point if a closed interval.
However, they do take care of that case by only checking for the points at the intersection of the interval and our $\epsilon$-neighbourhood. This means that at the end - points we only have to consider those points for comparison which lie in both, the interval $\mathbb{I}$ and the $\epsilon$, neighborhood if $x_0$.
Thus, we conclude that the definitions are valid at the end - points and that the end - points can be extremum points provided they satisfy the conditions outlined in the definitions.
Clearly, the function takers its greatest value at the point B, hence point B is a maximum point and corresponds to both a local and a global maxima.
