Message Boards Message Boards

0
|
5638 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Differential Operators: Coordinate Transformations?

Posted 8 years ago

I'm playing around with coordinate transformations. Here are a set of three rules defining the linear differential operation:

OpX /: OpX[Ae_ + Bee__] := OpX[Ae] + OpX[Bee]
OpX /: OpX[Ae_*Uu_ [Rr_, Teta_]] := {D[Ae Uu[Rr, Teta], Rr],  D[Ae Uu[Rr, Teta], Teta]}
OpX /: OpX[Uu_[Rr_, Teta_]] := {D[Uu[Rr, Teta], Rr], D[Uu[Rr, Teta], Teta]}

(Note: the Left hand SIde of the Rules with the underscores don't come out correctly for R_ and Teta_ because I don't know the escape characters) I define

CoefRay[Rr_, Teta_] := {Cos[Teta], -Sin[Teta]/Rr}

and compute

FrstOpX = CoefRay[rr, teta].OpX[You[rr, teta]].

Observe {D[FrstOpX, rr], D[FrstOpX, teta]} works a-okay. But not OpX[FrstOpX]; it goes ka-bluey when doing D[FrstOpX, teta] returning General::ivar: "-1 is not a valid variable." Any ideas how to modify the rules to overcome da'issue? Using MatchQ tells me the rules parse correctly. (At least they I think they should.)

POSTED BY: Anthony DeGance
3 Replies

Okay to begin with, I've learned that the second and third rules for OpX are malformed. Replacing OpX with OpIt, only two rules are required:

OpIt /: OpIt[Ae_ + Bee__] := OpIt[Ae] + OpIt[Bee]

OpIt /: OpIt[Ae_] := {D[Ae, Rr], D[Ae, Teta]}

So together with

FrstRay[Rr, Teta] := {Cos[Teta], -Sin[Teta]/Rr}

ScndRay[Rr, Teta] := {Sin[Teta], +Cos[Teta]/Rr}

gets us Del Sqrd in cylindrical coordinates using the code

FrstOpXx = FrstRay[Rr, Teta].OpIt[You[Rr, Teta]]

ScndOpXx = Expand[FrstRay[Rr, Teta].OpIt[FrstOpXx]]

FrstOpYy = ScndRay[Rr, Teta].OpIt[You[Rr, Teta]]

ScndOpYy = Expand[ScndRay[Rr, Teta].OpIt[FrstOpYy]]

DelSqrd = Simplify[ScndOpYy + ScndOpXx]

POSTED BY: Anthony DeGance

David,

I'm not as much interested in the application as learning the correct syntax here. Ignoring the note in parenthesis, it is posted as code. I see five input lines of code. Cutting and pasting into Mathematica notebook results in

(Debug) In[5]:= FrstOpX =CoefRay[rr, teta].OpX[You[rr, teta]]

(Debug) Out[5]=-Sin[teta] You(0,1)[rr, teta]/rr +Cos[teta] You(1,0)[rr, teta]

where You(0,1) and You(1,0) denote derivatives wrt teta and rr. The sixth and seventh input lines are

{D[FrstOpX, rr], D[FrstOpX, teta]}

OpX[FrstOpX]

The seventh line is should give the same result as sixth but doesn't. Do you have any insight as to why it doesn't?

POSTED BY: Anthony DeGance

Anthony, it is a bit difficult to follow your posting. It might have been better if posted as code.

If you are interested in vectors as linear operators then there is an application that does that and much more. It is a Grassmann Calculus application described at my web site. It is based on Grassmann algebra with coordinates and calculus added. There is specifically a command that turns vectors into differential operators, as well as all the vector derivatives, exterior differential forms and form integrals.

It is available for free to people seriously interested in the subject.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract