atlas[grad] - gradient operator
Calling Sequence:
grad(expr)
Parameters:
expr - any 0-form expression.
Description:
- The grad - procedure allows one to calculate the gradient operator on a 0-form expression. For any 0-form
we have
by definition.
Examples:
Declare constants:
 | (2.1) |
Declare functions:
| > | Functions(f=f(x,y),h=h(f)); |
 | (2.2) |
Declare p-forms:
![{xi, e[k]}](Maple/atlas/help/images/grad_5.gif) | (2.3) |
Declare vectors:
![{X, Y, Z, E[j]}](Maple/atlas/help/images/grad_6.gif) | (2.4) |
Declare coframe:
Coframe(e[1]=d(x),e[2]=d(y));
![[e[1] = d(x), e[2] = d(y)]](Maple/atlas/help/images/grad_7.gif) | (2.5) |
Declare frame:
Frame(E[k]);
![[E[1] = Diff(``, x), E[2] = Diff(``, y)]](Maple/atlas/help/images/grad_8.gif) | (2.6) |
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))))](Maple/atlas/help/images/grad_9.gif) | (2.7) |
Using grad procedure:
Just definition:
'grad(z)'=grad(z);
 | (2.8) |
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, `*`(`...](Maple/atlas/help/images/grad_11.gif)
![grad(f) = `+`(`*`(`/`(1, 4), `*`(Diff(f, x), `*`(`^`(`+`(1, `*`(Lambda, `*`(`^`(x, 2))), `*`(Lambda, `*`(`^`(y, 2)))), 2), `*`(E[1])))), `*`(`/`(1, 4), `*`(Diff(f, y), `*`(`^`(`+`(1, `*`(Lambda, `*`(`...](Maple/atlas/help/images/grad_12.gif) | (2.9) |
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), `*`(`^`(`+`(...](Maple/atlas/help/images/grad_13.gif)
![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), `*`(`^`(`+`(...](Maple/atlas/help/images/grad_14.gif) | (2.10) |
For 0-form - coordinate x:
'grad(x)'=grad(x);
![grad(x) = `+`(`*`(`/`(1, 4), `*`(`^`(`+`(1, `*`(Lambda, `*`(`^`(x, 2))), `*`(Lambda, `*`(`^`(y, 2)))), 2), `*`(E[1]))))](Maple/atlas/help/images/grad_15.gif) | (2.11) |
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])))))), `*`(`...](Maple/atlas/help/images/grad_16.gif)
![grad(`+`(`*`(cos(x), `*`(sin(y))), `*`(`^`(x, 2)))) = `+`(`-`(`*`(`/`(1, 4), `*`(sin(x), `*`(sin(y), `*`(`^`(`+`(1, `*`(Lambda, `*`(`^`(x, 2))), `*`(Lambda, `*`(`^`(y, 2)))), 2), `*`(E[1])))))), `*`(`...](Maple/atlas/help/images/grad_17.gif) | (2.12) |
| > | '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, `*`(`^`(`+`(1, `*`(Lambda...](Maple/atlas/help/images/grad_18.gif) | (2.13) |
See Also:
atlas, atlas[d], atlas[cov], atlas[div], atlas[L], atlas[dual].