An Analytic function (

) is defined by a symbolic expression. Analytic functions have the ability to bind arguments during function calls. In other words, they do not require the actual argument names in an expression when writing the function. For example, you can define a function
f(x) = x2 with the input argument
x and the expression
x^2 and the call it as
f(T), where
T is the temperature in a heat transfer model. The default
Function name is
an1.
In the Expression field, enter the mathematical expression that defines the function, such as
sin(x)*cos(y)+g_const or
a+b*cos(c). Enter
Arguments to the analytic function as comma-separated entries (
x,
y and
a,
b,
c for the functions above). In addition to the arguments that are defined, analytic functions also recognize global parameters and physical constants.
From the Derivatives list,
Automatic is selected by default and computes the derivatives symbolically. COMSOL uses the derivatives of a function if a variable that depends on the solution is used in a function argument. Select
Manual to specify the function derivatives with respect to its arguments in a table. If
Manual is selected, enter the derivatives with respect to the function’s arguments. For undefined derivatives, COMSOL uses 0 as the value of the derivative. In the second example above, enter
a,
b, and
c in the top three rows of the
Argument column, and
1,
cos(c), and
-b*sin(c)in the associated text fields in the
Partial derivative column.
Select the Make periodic check box to make the function periodic and extend its definition within an interval to the whole real axis. Then define the interval by entering values in the
Lower limit (default is 0) and
Upper limit (default is 1) fields.
Select the May produce complex output for real arguments check box if the defined function works similarly to
sqrt; that is, if it sometimes returns complex values for a real-valued input.