Max

Max[x1,x2,]

yields the numerically largest of the xi.

Max[{x1,x2,},{y1,},]

yields the largest element of any of the lists.

Details

Examples

open allclose all

Basic Examples  (3)

Maximum of two numbers:

Maximum of a list:

Plot over a subset of the reals:

Scope  (29)

Numerical Evaluation  (7)

Evaluate numerically:

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Evaluate efficiently at high precision:

The maximum of all elements of a matrix:

The maxima of all rows:

The maxima of all columns:

For Interval objects, Max gives the maximum element in all intervals:

For CenteredInterval objects, Max[Δ1,Δ2] gives an interval containing Max[a1,a2] for any aiΔi:

Compute average-case statistical intervals using Around:

Compute the elementwise values of an array using automatic threading:

Or compute the matrix Max function using MatrixFunction:

Specific Values  (5)

Values of Max at fixed points:

Values at infinity:

Evaluate symbolically:

Solve equations and inequalities:

Find a value of x for which Max[{Sin[x],Cos[x]}]1:

Visualization  (3)

Plot the Max of several functions:

Plot Max in three dimensions:

Plot Max of two functions in three dimensions:

Function Properties  (9)

Max is only defined for real-valued inputs:

The range of Max is all real numbers:

Max effectively flattens out all lists:

Basic symbolic simplification is done automatically:

Additional simplification can be done using Simplify:

Multi-argument Max is generally not an analytic function:

It will have singularities where the arguments cross, but it will be continuous:

Max can have any monotonicity depending on its arguments:

is not surjective:

Max can have any sign depending on its arguments:

Differentiation and Integration  (5)

First derivative with respect to x:

Higher derivatives with respect to x:

Formula for the ^(th) derivative with respect to x:

Compute the indefinite integral using Integrate:

Verify the anti-derivative:

Definite integrals:

Applications  (5)

Use in bounds of iterator variables:

Cumulative maxima:

Find the highest point of a plotted curve:

Mean of the length ratio of a randomly broken stick:

Rfunction-based solid modeling:

Properties & Relations  (6)

With no arguments, Max returns -Infinity:

Max is Flat and Orderless:

Use PiecewiseExpand to express Max and Min as explicit cases:

Use FullSimplify to simplify Max expressions:

Maximize a function containing Max:

Max can be differentiated:

Possible Issues  (2)

Max flattens lists, rather than being Listable:

The oneargument form evaluates for any argument:

Neat Examples  (2)

Two-dimensional sublevel sets:

Three-dimensional sublevel sets:

Wolfram Research (1988), Max, Wolfram Language function, https://reference.wolfram.com/language/ref/Max.html (updated 2021).

Text

Wolfram Research (1988), Max, Wolfram Language function, https://reference.wolfram.com/language/ref/Max.html (updated 2021).

CMS

Wolfram Language. 1988. "Max." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Max.html.

APA

Wolfram Language. (1988). Max. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Max.html

BibTeX

@misc{reference.wolfram_2024_max, author="Wolfram Research", title="{Max}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Max.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_max, organization={Wolfram Research}, title={Max}, year={2021}, url={https://reference.wolfram.com/language/ref/Max.html}, note=[Accessed: 22-December-2024 ]}