| atlas[grad] - gradient operator Calling Sequence: grad(expr) Parameters: expr - any 0-form expression. Description: The grad procedure calculates the gradient operator of a 0-form expression. For any 0-form we have by definition. Examples: restart: with(atlas): Declare constants: Constants(Lambda); 
Declare functions: Functions(f=f(x,y),h=h(f)); 
Declare p-forms: Forms(e[k]=1,xi=1); ![{xi, e[k]}](prod/atlas/help/images/grad5.gif)
Declare vectors: Vectors(E[j],X,Y,Z); ![{X, Y, Z, E[j]}](prod/atlas/help/images/grad6.gif)
Declare coframe: Coframe(e[1]=d(x),e[2]=d(y)); ![[e[1] = d(x), e[2] = d(y)]](prod/atlas/help/images/grad7.gif)
Declare frame: Frame(E[k]); ![[E[1] = Diff(``,x), E[2] = Diff(``,y)]](prod/atlas/help/images/grad8.gif)
Declare metric: Metric(g=4*(d(x)&.d(x)+d(y)&.d(y))/(1+Lambda*(x^2+y^2))^2); ![g = 4*(`&.`(e[1],e[1])+`&.`(e[2],e[2]))/(1+Lambda*(x^2+y^2))^2](prod/atlas/help/images/grad9.gif)
Using grad procedure: Just definition: 'grad(z)'=grad(z); 
For function f: 'grad(f)'=grad(f); ![grad(f) = 1/4*Diff(f,x)*(1+Lambda*x^2+Lambda*y^2)^2*E[1]+1/4*Diff(f,y)*(1+Lambda*x^2+Lambda*y^2)^2*E[2]](prod/atlas/help/images/grad11.gif)
For h which depends on f: 'grad(h)'=grad(h); ![grad(h) = Diff(h,f)*(1/4*Diff(f,x)*(1+Lambda*x^2+Lambda*y^2)^2*E[1]+1/4*Diff(f,y)*(1+Lambda*x^2+Lambda*y^2)^2*E[2])](prod/atlas/help/images/grad12.gif)
For 0-form - coordinate x: 'grad(x)'=grad(x); ![grad(x) = 1/4*(1+Lambda*x^2+Lambda*y^2)^2*E[1]](prod/atlas/help/images/grad13.gif)
Some more examples: 'grad(cos(x)*sin(y)+x^2)'=grad(cos(x)*sin(y)+x^2); ![grad(cos(x)*sin(y)+x^2) = -1/4*sin(x)*sin(y)*(1+Lambda*x^2+Lambda*y^2)^2*E[1]+1/4*cos(x)*cos(y)*(1+Lambda*x^2+Lambda*y^2)^2*E[2]+1/2*x*(1+Lambda*x^2+Lambda*y^2)^2*E[1]](prod/atlas/help/images/grad15.gif)
'grad(x*ln(y))'=grad(x*ln(y)); ![grad(x*ln(y)) = 1/4*ln(y)*(1+Lambda*x^2+Lambda*y^2)^2*E[1]+1/4*x/y*(1+Lambda*x^2+Lambda*y^2)^2*E[2]](prod/atlas/help/images/grad16.gif)
See Also: atlas , atlas[d] , atlas[cov] , atlas[div] , atlas[L] , atlas[dual] . |