1. Functions

Function (mapping, operator, transformation) is a mathematical concept that reflects the connection between the elements of sets.

The function is the rule by which each element of one set (domain of definition) corresponds to some element of another set (domain of values).

Often, the term "function" is understood as a numerical function - when one number corresponds to another.

The term "function" was introduced by Leibniz (1692).

Distinguish functions:

  • depending on variables - one variable, many variables, etc .;
  • the form of presentation - tabular, analytical;
  • look - algebraic, trigonometric, etc.

Functions in computer systems are usually divided into four types:

  • embedded in the core of the system;
  • user functions;
  • library functions from packages or from extension libraries;
  • functions that are specified as a program module.

Maple has a large set of standard math functions, both elementary and special (tab.).

Function Maple syntax

 

Function

Maple syntax

e x

exp (x)

                                                            

sqrt (x)

ln (x)

ln (x) or log (x)

    

abs (x)

    

log10 (x)

sgn (x)

signum (x)

    

log [a] (x)

n!

n! or factorial

Definition of functions

In Maple, there are several ways to define functions:

  • Assigning a variable to a certain expression, for example: F0: = cos (t) +1;
  • with the help of a functional operator the function name: = list of parameters -> expression; for example: F1: = (x, y) → x (y ^ 2);
  • using the unapply command (expression, parameters) that converts the expression into a functional operator, for example, F2: = unapply (F0, t);
  • using the statement define (operator, property1, property2, ...) .

In the first case, an object is not a complete function of the user, since it uses only global variables and there is no declared parameter list on which the function value depends.

Maple will not understand the call to the variable F0 as a function in the form F0 (0.1). You must specify the following: t = 0.1: F0:, which is not always convenient.

In the second and third way, the variables listed in the list of formal parameters are local.

For these methods, access to functions occurs in the standard way: the name ( a, b, ...), where a, b, ... are the specific values of the variables.

Inappropriate assignment: = create a user's function as follows: Fn (x): = (x ^ 3:

Although Maple2016 allows you to do this. Fn (2) = 8.