| 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 declares functions. In the atlas package a function is non-constant 0-form which depends on other 0-forms.
- There are two different syntax of function declaration.
- Use first one f=f(x,y,z) to declare function f which depends on x, y, and z;
- Use second one F=F(x[i]) i.e.
to declare function F which depends on if the working dimension is numeric or if the dimension is symbolic (see atlas[dim] ). - The function identifier can be either symbol or indexed value (see examples below).
Examples: restart: with(atlas): Declare as a constant: Constants(alpha[k]); ![{Catalan, I, _Z, Pi, -I, alpha[k]}](prod/atlas/help/images/Functions5.gif)
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])); ![{z, h, f, F, H[i], alpha[i,j]}](prod/atlas/help/images/Functions7.gif)
Varify that f is a function using exterior derivative operator (see atlas[d] ): 'd(f)'=d(f); 
Verify that h is a function: 'd(h)'=d(h); 
Another example: 'd(z)'=d(z); 
Some more examples 'd(F)'=d(F); ![d(F) = Sum(Diff(F,x[l[1]])*d(x[l[1]]),l[1] = 1 .. dim)](prod/atlas/help/images/Functions11.gif)
'd(f*F)'=d(f*F); ![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)](prod/atlas/help/images/Functions12.gif)
As then: 'd(H[j])'=d(H[j]); ![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 .. dim)](prod/atlas/help/images/Functions14.gif)
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])](prod/atlas/help/images/Functions17.gif)

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)](prod/atlas/help/images/Functions20.gif)
As is a constant then: 'd(alpha[i])'=d(alpha[i]); ![d(alpha[i]) = 0](prod/atlas/help/images/Functions22.gif)
But: 'd(alpha[i,j,k])'=d(alpha[i,j,k]); ![d(alpha[i,j,k]) = d(alpha[i,j,k])](prod/atlas/help/images/Functions23.gif)
And more - using exterior product operator (see atlas[`&^`] ): 'd(f)&^d(phi)'=d(f)&^d(phi); 
Some trivial examples: 'd(exp(-x^2)+cos(y))'=d(exp(-x^2)+cos(y)); 
'd(f*x^3)'=d(f*x^3); 
And not so trivial ones ( n - was not declared as a constant! ): 'd(f^n)'=d(f^n); 
Declare lambda as a constant (see atlas[Constants] ): Constants(lambda); ![{Catalan, I, _Z, Pi, lambda, -I, alpha[k]}](prod/atlas/help/images/Functions28.gif)
Thus: 'd(f^lambda)'=d(f^lambda); 
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
Who(); ![PIECEWISE([{}, Domains],[{}, Mappings],[{}, Tensors],[{}, Forms],[{Catalan, I, _Z, Pi, lambda, -I, alpha[k]}, Constants],[{z, h, f, F, H[i], alpha[i,j]}, Functions])](prod/atlas/help/images/Functions30.gif)
See Also: atlas , atlas[Constants] , atlas[Forms] , atlas[Vectors] , atlas[Tensors] , atlas[d] , atlas[`&^`] , atlas[Who] . |