Difference between revisions of "Max Command"

From GeoGebra Manual
Jump to: navigation, search
(added example for functions)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
{{command|cas=true|algebra}}
 
{{command|cas=true|algebra}}
;Max[ <Number a>, <Number b> ]
+
;Max[ <Number>, <Number> ]
:Gives the maximum of the given numbers ''a'' and ''b''.
+
:Returns the maximum of the two given numbers.
:{{example| 1=<div><code><nowiki>Max[12, 15]</nowiki></code> yields ''15''.</div>}}
+
:{{example| 1=<code><nowiki>Max[12, 15]</nowiki></code> yields ''15''.}}
 
;Max[ <List of Numbers> ]
 
;Max[ <List of Numbers> ]
:Gives the maximum of the numbers within the list.
+
:Returns the maximum of the numbers within the list.
:{{example| 1=<div><code><nowiki>Max[{-2, 12, -23, 17, 15}]</nowiki></code> yields ''17''.</div>}}
+
:{{example| 1=<code><nowiki>Max[{-2, 12, -23, 17, 15}]</nowiki></code> yields ''17''.}}
:{{note| 1=If the input consists of non-numeric objects, then ''Max[]'' considers the numbers associated with those objects.  For example, ''Max[List of Segments]'' will yield the maximum segment length.}}
+
:{{note| 1=If the input consists of non-numeric objects, then ''Max''[] considers the numbers associated with those objects.  For example, ''Max''[''List of Segments''] will yield the maximum segment length.}}
 +
 
 
;Max[ <Function>, <left-x>, <right-x> ]
 
;Max[ <Function>, <left-x>, <right-x> ]
 
:Calculates the maximum point of the function in the given interval. The function should be continuous and have only one ''local'' maximum point in the interval.  
 
:Calculates the maximum point of the function in the given interval. The function should be continuous and have only one ''local'' maximum point in the interval.  
 +
:{{example| 1=<code><nowiki>Max[ x^3 + 2x^2 - 1, -2, 0]</nowiki></code> creates the point (-1.33, 0.19).}}
 
;Max[ <Interval> ]
 
;Max[ <Interval> ]
:Gives the upper bound of the interval.
+
:Returns the upper bound of the interval.
:{{example| 1=<div><code><nowiki>Max[2 < x < 3]</nowiki></code> yields ''3''.</div>}}
+
:{{example| 1=<code><nowiki>Max[2 < x < 3]</nowiki></code> yields ''3''.}}
 
:{{note| 1=Open and closed intervals are treated the same.}}
 
:{{note| 1=Open and closed intervals are treated the same.}}
 
{{note| 1=See also [[Extremum Command]], [[Min Command]] and [[Function Inspector Tool]].}}
 
{{note| 1=See also [[Extremum Command]], [[Min Command]] and [[Function Inspector Tool]].}}
 
==CAS Syntax==
 
==CAS Syntax==
;Max[ <Number a>, <Number b> ]
+
;Max[ <Number>, <Number> ]
:Gives the maximum of the given numbers ''a'' and ''b''.
+
:Returns the maximum of the two given numbers.
:{{example| 1=<div><code><nowiki>Max[12, 15]</nowiki></code> yields ''15''.</div>}}
+
:{{example| 1=<code><nowiki>Max[12, 15]</nowiki></code> yields ''15''.}}
 
;Max[ <List of Numbers> ]
 
;Max[ <List of Numbers> ]
:Gives the maximum of the numbers within the list.
+
:Returns the maximum of the numbers within the list.
:{{example| 1=<div><code><nowiki>Max[{-2, 12, -23, 17, 15}]</nowiki></code> yields ''17''.</div>}}
+
:{{example| 1=<code><nowiki>Max[{-2, 12, -23, 17, 15}]</nowiki></code> yields ''17''.}}
 
{{note| 1=See also [[Extremum Command]] and [[Min Command]].}}
 
{{note| 1=See also [[Extremum Command]] and [[Min Command]].}}

Revision as of 17:43, 23 June 2013



Max[ <Number>, <Number> ]
Returns the maximum of the two given numbers.
Example: Max[12, 15] yields 15.
Max[ <List of Numbers> ]
Returns the maximum of the numbers within the list.
Example: Max[{-2, 12, -23, 17, 15}] yields 17.
Note: If the input consists of non-numeric objects, then Max[] considers the numbers associated with those objects. For example, Max[List of Segments] will yield the maximum segment length.
Max[ <Function>, <left-x>, <right-x> ]
Calculates the maximum point of the function in the given interval. The function should be continuous and have only one local maximum point in the interval.
Example: Max[ x^3 + 2x^2 - 1, -2, 0] creates the point (-1.33, 0.19).
Max[ <Interval> ]
Returns the upper bound of the interval.
Example: Max[2 < x < 3] yields 3.
Note: Open and closed intervals are treated the same.

CAS Syntax

Max[ <Number>, <Number> ]
Returns the maximum of the two given numbers.
Example: Max[12, 15] yields 15.
Max[ <List of Numbers> ]
Returns the maximum of the numbers within the list.
Example: Max[{-2, 12, -23, 17, 15}] yields 17.
Note: See also Extremum Command and Min Command.
© 2024 International GeoGebra Institute