Difference between revisions of "Functions"
From GeoGebra Manual
m |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{objects|geometric}} |
− | {{objects|geometric}} | + | To enter a function you can use previously defined variables (e.g. numbers, points, vectors) as well as other functions. |
− | To enter a function you can use previously defined variables (e. g. numbers, points, vectors) as well as other functions. | ||
− | {{example| | + | {{example|1=<div> |
− | * Function f: <code | + | * Function f: <code>f(x) = 3 x^3 – x^2</code> |
− | * Function g: <code | + | * Function g: <code>g(x) = tan(f(x))</code> |
− | * Nameless function: <code | + | * Nameless function: <code>sin(3 x) + tan(x)</code></div>}} |
− | {{note| All available | + | {{note|All available predefined functions (e.g. sin, cos, tan) are described in section [[Predefined Functions and Operators]].}} |
In GeoGebra you can also use commands to get for example, the [[Integral Command|integral]] and [[Derivative Command|derivative]] of a function. You can use [[If Command]] to get [[Conditional Functions]]. | In GeoGebra you can also use commands to get for example, the [[Integral Command|integral]] and [[Derivative Command|derivative]] of a function. You can use [[If Command]] to get [[Conditional Functions]]. | ||
− | {{note|You can also use the commands <nowiki>f'(x) or f''(x)</nowiki>, … in order to get the derivatives of a previously defined function f(x).}} | + | {{note|1=You can also use the commands <nowiki>f'(x) or f''(x)</nowiki>, … in order to get the derivatives of a previously defined function f(x).}} |
− | {{example|Define function f as <code | + | {{example|1=Define function ''f'' as <code>f(x) = 3 x^3 – x^2</code>. Then, you can type in |
− | <code | + | <code>g(x) = cos(f' (x + 2))</code> in order to get function ''g''.}} |
− | Furthermore, functions can be translated by a vector (see [[Translate Command]]) and a free function can be moved | + | Furthermore, functions can be translated by a vector (see [[Translate Command]]) and a free function can be moved by using the [[File:Mode move.svg|link=|22px]][[Move Tool]]. Other [[Transformation Commands]] can be also applied to functions, but in most cases the result is not a function but a curve. |
==Limit Function to Interval== | ==Limit Function to Interval== | ||
− | In order to limit a function to an interval [a, b], you | + | In order to limit a function to an interval [a, b], you need to use the [[Function Command]] or the [[If Command]]. |
− | {{example|<code>If[ | + | {{example|1=<code>If[3<=x<=5,x^2]</code> and <code>Function[x^2,3,5]</code> both define a function ''x<sup>2</sup>'' restricted to interval [3,5]}} |
Latest revision as of 12:31, 21 September 2015
To enter a function you can use previously defined variables (e.g. numbers, points, vectors) as well as other functions.
Example:
- Function f:
f(x) = 3 x^3 – x^2
- Function g:
g(x) = tan(f(x))
- Nameless function:
sin(3 x) + tan(x)
Note: All available predefined functions (e.g. sin, cos, tan) are described in section Predefined Functions and Operators.
In GeoGebra you can also use commands to get for example, the integral and derivative of a function. You can use If Command to get Conditional Functions.
Note: You can also use the commands f'(x) or f''(x), … in order to get the derivatives of a previously defined function f(x).
Example: Define function f as
f(x) = 3 x^3 – x^2
. Then, you can type in
g(x) = cos(f' (x + 2))
in order to get function g.
Furthermore, functions can be translated by a vector (see Translate Command) and a free function can be moved by using the Move Tool. Other Transformation Commands can be also applied to functions, but in most cases the result is not a function but a curve.
Limit Function to Interval
In order to limit a function to an interval [a, b], you need to use the Function Command or the If Command.
Example:
If[3<=x<=5,x^2]
and Function[x^2,3,5]
both define a function x2 restricted to interval [3,5]