Edgardo Cheb-Terrab

MaplePrimes Activity

These are replies submitted by Edgardo Cheb-Terrab

What is missing here is the link Gamma <-> trig in the conversion network. With that, Beta <-> trig would work automatically. On top of that, `simplify/Gamma`, coded before the existence of the conversion network, is also not making full use of the relationship GAMMA <-> trig. Both things need to be addressed/fixed within the Maple library.

Edgardo S. Cheb-Terrab 
Physics, Maplesoft

This looks to me like just a bug. Concretely, 



F := f(rho,phi)*_rho + g(rho,phi)*_phi;

f(rho, phi)*_rho+g(rho, phi)*_phi


V := u*_rho + v*_phi;



You can compute the directional derivative of F (in the direction of V) as  (V . Nabla)(F) also in curvilinear coordinates. Compute V. Nabla

V_Nabla := V . Nabla;

(proc (f) options operator, arrow, vector; u*(diff(f, rho)) end proc)+(proc (f) options operator, arrow, vector; v*(diff(f, phi))/rho end proc)


The bug: instead of ':-diff', in the above it should be Physics:-diff (or Physics:-Vectors:-VectorDiff in Maple 15 and earlier), which takes into account the dependence of `#mover(mi("&rho;",fontstyle = "normal"),mo("&and;"))` with respect to phi. So:

V_Nabla_fixed := subs(:-diff = Physics:-diff, V_Nabla);

(proc (f) options operator, arrow, vector; u*Physics:-diff(f, rho) end proc)+(proc (f) options operator, arrow, vector; v*Physics:-diff(f, phi)/rho end proc)


Compute now:


u*((diff(f(rho, phi), rho))*_rho+(diff(g(rho, phi), rho))*_phi)+v*((-g(rho, phi)+diff(f(rho, phi), phi))*_rho+(f(rho, phi)+diff(g(rho, phi), phi))*_phi)/rho


collect(%, [_rho, _phi], expand);

(u*(diff(f(rho, phi), rho))-v*g(rho, phi)/rho+v*(diff(f(rho, phi), phi))/rho)*_rho+(u*(diff(g(rho, phi), rho))+v*f(rho, phi)/rho+v*(diff(g(rho, phi), phi))/rho)*_phi


This result above is correct - also in agreement with the one you present as correct. Summarizing: also in curvilinear coordinates the directional derivative is computed as  (V . Nabla)(F). 



Also, I don't think this is a computation that requires knowlege of curvature tensors, connections or Christoffel symbols, although you can of course formulate the problem in such a very formal way too, if you prefer. In the same line, I think it is unnecessary to use the more advanced and intrinsically more difficult to use DifferentialGeometry package to perform this kind of so simple computation. Besides, these packages, Physics, DifferentialGeometry and PDEtools, though developed in different moments, are all interconected, even if sometimes a bug is hit by only one of them (in this example due to the intermediate step of constructing an operator V . Nabla, which is all that the command you presented, Physics:-Vectors:-DirectionalDiff, does).


Details about the bug you crossed paths with.

In V_Nabla you see a term differentiating with respect to phi, so if you differentiate the unit vector `#mover(mi("&rho;",fontstyle = "normal"),mo("&and;"))`, you expect the derivative to be different from zero, of course. Both Physics:-Diff and Physics:-VectorDiff have that knowledge, but not the standard Maple :-diff. Compare:

Physics:-diff(_rho, phi);




:-diff(_rho, phi);



I also see this bug is not present in the version under development. This fix will then probably be available to everyone whenever an update of Maple 16 happens.

Edgardo Cheb-Terrab



Download directionalderivativ.mw

Page 1 of 1