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 then 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, respectively). In addition to the arguments that are defined, analytic functions also recognize global parameters and physical constants (such as
g_const in the example above). It is also possible to call another function.
From the Derivatives list,
Automatic is selected by default and computes the derivatives symbolically. The COMSOL Multiphysics software 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 Multiphysics 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 checkbox 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: 0) and
Upper limit (default: 1) fields.
You can also use the Move Up (

),
Move Down (

),
Delete (

), and
Clear Table (

) buttons underneath the table to move and remove rows and to clear the table. Use the
Load from File (

) and
Save to File (

) buttons to load or save data to or from the table. You can also click the downward arrow beside the
Load from File button and choose
Load From (

) to open the fullscreen
Select File window.
Select the May produce complex output for real arguments checkbox if the defined function works similarly to
sqrt; that is, if it sometimes returns complex values for a real-valued input.