Functions
To enter a function you can use previously defined variables (e.g. numbers, points, vectors) as well as other functions.

Function f:
f(x) = 3 x^3 – x^2

Function g:
g(x) = tan(f(x))

Nameless function:
sin(3 x) + tan(x)
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.
You can also use the commands f'(x) or f''(x), … in order to get the derivatives of a previously defined function f(x). 
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.
If[3<=x<=5,x^2]
and Function[x^2,3,5]
both define a function x^{2} restricted to interval [3,5]