Difference between revisions of "Min Command"

From GeoGebra Manual
Jump to: navigation, search
(:Calculates (numerically) the '''local''' minimum point)
(CAS Syntax)
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
:Returns the lower bound of the interval.
 
:Returns the lower bound of the interval.
 
:{{example| 1=<code><nowiki>Min(2 < x < 3)</nowiki></code> yields ''2'' .}}
 
:{{example| 1=<code><nowiki>Min(2 < x < 3)</nowiki></code> yields ''2'' .}}
:{{note| 1=Opened and closed intervals are not distinguished.}}
+
:{{note| 1=Open and closed intervals are not distinguished.}}
 
;Min( <Number>, <Number> )
 
;Min( <Number>, <Number> )
 
:Returns the minimum of the two given numbers.
 
:Returns the minimum of the two given numbers.
 
:{{example| 1=<code><nowiki>Min(12, 15)</nowiki></code>  yields ''12''.}}
 
:{{example| 1=<code><nowiki>Min(12, 15)</nowiki></code>  yields ''12''.}}
 
;Min( <Function>, <Start x-Value>, <End x-Value> )
 
;Min( <Function>, <Start x-Value>, <End x-Value> )
:Calculates (numerically) the '''local''' minimum point for function in the given interval. Function should be continuous and have only one ''local'' minimum point in the interval.  
+
:Calculates (numerically) the '''local''' minimum point for function in the given interval. Function should be continuous and have only one ''local'' minimum point in the interval (and no local maximum).  
 
:{{note| 1=For polynomials you should use the [[Extremum Command]].}}
 
:{{note| 1=For polynomials you should use the [[Extremum Command]].}}
 
:{{example| 1=<code><nowiki>Min(exp(x) x^3,-4,-2)</nowiki></code> creates the point (-3, -1.34425) .}}
 
:{{example| 1=<code><nowiki>Min(exp(x) x^3,-4,-2)</nowiki></code> creates the point (-3, -1.34425) .}}
Line 22: Line 22:
 
* If you want the minimum of two functions <code>f(x)</code> and <code>g(x)</code> then you can define <code>(f(x) + g(x) - abs(f(x) - g(x)))/2</code>
 
* If you want the minimum of two functions <code>f(x)</code> and <code>g(x)</code> then you can define <code>(f(x) + g(x) - abs(f(x) - g(x)))/2</code>
 
* See also [[Max Command]], [[Extremum Command]] and [[Function Inspector Tool]].</div>}}
 
* See also [[Max Command]], [[Extremum Command]] and [[Function Inspector Tool]].</div>}}
 +
 +
==CAS Syntax==
 +
;Min( <Function>, <Start x-Value>, <End x-Value> )
 +
:Unlike in the Algebra View, this syntax will give the minimum over the interval, including endpoints
 +
:{{example|1=<div>
 +
:*<code><nowiki>Min(x^2,-1,2)</nowiki></code> yields the point ''(0,0)''
 +
:*<code><nowiki>Min(-x^2,-1,2)</nowiki></code> yields the point ''(2,-4)''
 +
</div>}}

Latest revision as of 13:43, 22 November 2023


Min( <List> )
Returns the minimum of the numbers within the list.
Example: Min({-2, 12, -23, 17, 15}) yields -23.
Note: If the input consists of non-numeric objects, then this command considers the numbers associated with those objects. If you have a list of segments for example, the command Min( <List> ) will yield the minimum segment length.
Min( <Interval> )
Returns the lower bound of the interval.
Example: Min(2 < x < 3) yields 2 .
Note: Open and closed intervals are not distinguished.
Min( <Number>, <Number> )
Returns the minimum of the two given numbers.
Example: Min(12, 15) yields 12.
Min( <Function>, <Start x-Value>, <End x-Value> )
Calculates (numerically) the local minimum point for function in the given interval. Function should be continuous and have only one local minimum point in the interval (and no local maximum).
Note: For polynomials you should use the Extremum Command.
Example: Min(exp(x) x^3,-4,-2) creates the point (-3, -1.34425) .
Min( <List of Data>, <List of Frequencies> )
Returns the minimum of the list of data with corresponding frequencies.
Example: Min({1, 2, 3, 4, 5}, {0, 3, 4, 2, 3}) yields 2, the lowest number of the first list whose frequency is greater than 0.


Note:

CAS Syntax

Min( <Function>, <Start x-Value>, <End x-Value> )
Unlike in the Algebra View, this syntax will give the minimum over the interval, including endpoints
Example:
  • Min(x^2,-1,2) yields the point (0,0)
  • Min(-x^2,-1,2) yields the point (2,-4)
© 2024 International GeoGebra Institute