Notation of functions

The symbol $ f(x)$ is used to denote a function of $ x$, and is read ``$ f$ of $ x$''. In order to distinguish between different functions, the prefixed letter is changed, as $ F(x)$, $ \phi(x)$, $ f'(x)$, etc.

During any investigation the same functional symbol always indicates the same law of dependence of the function upon the variable. In the simpler cases this law takes the form of a series of analytical operations upon that variable. Hence, in such a case, the same functional symbol will indicate the same operations or series of operations, even though applied to different quantities. Thus, if

$\displaystyle f(x) = x^2 - 9x + 14,
$

then

$\displaystyle f(y) = y^2 - 9y + 14.
$

Also

$\displaystyle f(a) = a^2 - 9a + 14,
$

$\displaystyle f(b + 1) = (b + 1)^2 - 9(b + 1) + 14 = b^2 - 7b + 6,
$

$\displaystyle f(0) = 0^2 - 9 \cdot 0 + 14 = 14,
$

$\displaystyle f(-1) = (-1)^2 -9(-1) + 14 = 24,
$

$\displaystyle f(3) = 3^2 -9 \cdot 3 + 14 = -4,
$

$\displaystyle f(7) = 7^2 -9 \cdot 7 + 14 = 0,
$

etc. Similarly, $ \phi(x,\ y)$ denotes a function of $ x$ and $ y$, and is read ``$ \phi$ of $ x$ and $ y$''. If

$\displaystyle \phi(x,\ y) = \sin(x + y),
$

then

$\displaystyle \phi(a,\ b) = \sin(a + b),
$

and

$\displaystyle \phi \left ( \frac{\pi}{2}, 0 \right ) = \sin \frac{\pi}{2} = 1.
$

Again, if

$\displaystyle F( x,\ y,\ z ) = 2x + 3y - 12z,
$

then

$\displaystyle F(m,\ -m,\ m) = 2m - 3m - 12m = - 13m.
$

and

$\displaystyle F(3,\ 2,\ 1) = 2 \cdot 3 + 3 \cdot 2 - 12 \cdot 1 = 0.
$

Evidently this system of notation may be extended indefinitely.

You can define a function in SAGE in several ways:

[fontsize=\scriptsize,fontfamily=courier,fontshape=tt,frame=single,label=\sage]

sage: x,y = var("x,y")
sage: f = log(sqrt(x))
sage: f(4)
log(4)/2
sage: f(4).simplify_log()
log(2)
sage: f = lambda x: (x^2+1)/2
sage: f(x)
(x^2 + 1)/2
sage: f(1)
1
sage: f = lambda x,y: x^2+y^2
sage: f(3,4)
25

david joyner 2008-08-11