atlas[Functions] - declaration of functions
Calling Sequence:
Functions(F1=F1(x1, x2, ...,xn), F2=F2(y1, y2, ..., ym), ..., Fk=Fk(z1, z2, ..., zj))
Parameters:
Fk=Fk(z1, z2, ..., zj) - equations where Fk-function identifier and zj - variables.
Description:
- In the atlas package any identifier is treated as 0-form i.e. as non-constant scalar (if it not declared as constant, p-form, tensor etc. (see atlas[types])).
- The Functions procedure allows one to declare functions. In the atlas package a function is non-constant 0-form which depends on other 0-forms.
- There are two different syntaxes for function declaration.
- Use the first form f=f(x,y,z) to declare a function f depending on x, y, and z;
- Use the second form F=F(x[i]) i.e.
to declare a function F depending on
if the working dimension is numeric or
if the dimension is symbolic (see atlas[dim]).
- The function identifiers can be either symbolic or indexed values (see examples below).
Examples:
Declare
as a constant:
![{`+`(`-`(I)), I, Pi, _Z, Catalan, alpha[k]}](Maple/atlas/help/images/Functions_5.gif) | (2.1) |
Declare
as functions:
| > | Functions(f=f(x,y),h=h(phi,psi,chi),z=z(f,h),F=F(x[i]), H[i]=H[i](x,y,x[k],y[j]),alpha[i,j]=alpha[i,j](x[k])); |
![{F, f, h, z, H[i], alpha[i, j]}](Maple/atlas/help/images/Functions_7.gif) | (2.2) |
Varify that f is a function using exterior derivative operator (see atlas[d]):
 | (2.3) |
Verify that h is a function:
 | (2.4) |
Another example:

 | (2.5) |
Some more examples
'd(F)'=d(F);
![d(F) = Sum(`*`(Diff(F, x[l[1]]), `*`(d(x[l[1]]))), l[1] = 1 .. dim)](Maple/atlas/help/images/Functions_12.gif) | (2.6) |
![d(`*`(f, `*`(F))) = `+`(`*`(`+`(`*`(Diff(f, x), `*`(d(x))), `*`(Diff(f, y), `*`(d(y)))), `*`(F)), `*`(f, `*`(Sum(`*`(Diff(F, x[l[2]]), `*`(d(x[l[2]]))), l[2] = 1 .. dim))))](Maple/atlas/help/images/Functions_13.gif) | (2.7) |
As
then:
![d(H[j]) = `+`(`*`(Diff(H[j], x), `*`(d(x))), `*`(Diff(H[j], y), `*`(d(y))), Sum(`*`(Diff(H[j], x[l[1]]), `*`(d(x[l[1]]))), l[1] = 1 .. dim), Sum(`*`(Diff(H[j], y[l[1]]), `*`(d(y[l[1]]))), l[1] = 1 .. ...](Maple/atlas/help/images/Functions_15.gif)
![d(H[j]) = `+`(`*`(Diff(H[j], x), `*`(d(x))), `*`(Diff(H[j], y), `*`(d(y))), Sum(`*`(Diff(H[j], x[l[1]]), `*`(d(x[l[1]]))), l[1] = 1 .. dim), Sum(`*`(Diff(H[j], y[l[1]]), `*`(d(y[l[1]]))), l[1] = 1 .. ...](Maple/atlas/help/images/Functions_16.gif) | (2.8) |
But
and
are just 0-forms:
| > | 'd(H[i,j])'=d(H[i,j]); 'd(H)'=d(H); |
![d(H[i, j]) = d(H[i, j])](Maple/atlas/help/images/Functions_19.gif) |
 | (2.9) |
As
then:
| > | 'd(alpha[n,m])'=d(alpha[n,m]); |
![d(alpha[n, m]) = Sum(`*`(Diff(alpha[n, m], x[l[1]]), `*`(d(x[l[1]]))), l[1] = 1 .. dim)](Maple/atlas/help/images/Functions_22.gif) | (2.10) |
As
is a constant then:
| > | 'd(alpha[i])'=d(alpha[i]); |
![d(alpha[i]) = 0](Maple/atlas/help/images/Functions_24.gif) | (2.11) |
But:
| > | 'd(alpha[i,j,k])'=d(alpha[i,j,k]); |
![d(alpha[i, j, k]) = d(alpha[i, j, k])](Maple/atlas/help/images/Functions_25.gif) | (2.12) |
And more - using exterior product operator (see atlas[`&^`]):
| > | 'd(f)&^d(phi)'=d(f)&^d(phi); |

 | (2.13) |
Some trivial examples:
| > | 'd(exp(-x^2)+cos(y))'=d(exp(-x^2)+cos(y)); |
 | (2.14) |
 | (2.15) |
And not so trivial ones (n - was not declared as a constant!):
 | (2.16) |
Declare lambda as a constant (see atlas[Constants]):
Constants(lambda);
![{`+`(`-`(I)), I, Pi, _Z, Catalan, lambda, alpha[k]}](Maple/atlas/help/images/Functions_31.gif) | (2.17) |
Thus:
'd(f^lambda)'=d(f^lambda);
 | (2.18) |
Let's see "who is who"
| > | Who([f,h,x,y,z,lambda]); |
f: function h: function x: 0 - form y: 0 - form z: function lambda: constant | |
![piecewise(Domains, {}, Mappings, {}, Tensors, {}, Forms, {}, Constants, {`+`(`-`(I)), I, Pi, _Z, Catalan, lambda, alpha[k]}, Functions, {F, f, h, z, H[i], alpha[i, j]})](Maple/atlas/help/images/Functions_33.gif) | (2.19) |
See Also:
atlas, atlas[Constants], atlas[Forms], atlas[Vectors], atlas[Tensors], atlas[d], atlas[`&^`], atlas[Who].