Funktionen
(ausgewählte Rechenanweisungen)
Funktionsterme

Definition eines Funktionsterms f(x)
f(x):= x^2 + 3;

Definition einer Funktion f durch eine Zuordnungsvorschrift
f:= x -> x^2 + 3;

Definition einer Funktion f mit Hilfe eines Funktionsterms
f:= unapply(x^2 + 3, x);


Spezielle Funktionen

Betragsfunktion
abs(-3);
3
Binomialkoeffizient (n über k)
binomial(12, 4);
495
e-Funktion
exp(1);
e
evalf(exp(1));
2.718281828
Fakultätsfunktion
factorial(4);
24
4!;
24
Konvertierungsfunktion
convert(Pi/2, degrees);

convert(45*degrees, radians);

term:= (2*x^3 - 5*x^2 + 7)/(4*x^2 + 4*x);

convert(%, confrac, x);

convert(binomial(n,k), factorial);

Logarithmus zur Basis b
b:= 2:
evalf(log[b](16));
4.0000000000
Maximum
max(-2.3, 1/3, 0.3);

Minimum
min(seq (n^2 - 2*n, n = -5..5));
-1
Natürlicher Logarithmus
ln(exp(2));
2
Quadratwurzelfunktion
evalf(sqrt(2));
1.4142135620
Rundungsfunktionen
ceil(13.285);
14
floor(13.764);
13
round(13.499);
13
Trigonometrische Funktionen und inverse trigonometrische Funktionen
sin(Pi);
0
arcsin(0);
0
cos(0.5);
0.8775825619
arccos(-1);

tan(Pi/2);
Error, (in tan) numeric exception: division by zero
arctan(1000.);
1.569796327
n-te reelle Wurzel aus einer Zahl
n:= 5:
surd(-2, n);

surd(-2., n);
-1.148698355
Vorzeichenfunktion
signum(-7);
-1
Schaubilder





Animation
with (plots):
animate (t*x^2, x= -3..3, t= 0..4,
view= -5..10,
frames = 60);
Darstellung implizit definierter Funktionen
with (plots):
f(x,y):= x^3 - y^3;
implicitplot (f(x,y)= x + y,
x = -2..2,
y = -1..1,
numpoints = 2000);
Dreidimensionale Grafik
plot3d ((1.3)^x*sin(y),
x = -2..6, y = -4..3,
style = patchnogrid,
numpoints = 2000,
orientation = [-129, -90],
axes = none);
Zeichnen des Schaubildes einer Funktion
plot (f(x), x = a..b);
Zeichnen der Schaubilder mehrerer Funktionen
plot ([f(x), g(x)], x = a..b);
Zeichnen des Schaubildes einer Funktion mit Unstetigkeitsstellen
plot (f(x), x = a..b, discont = true):

