Group Abstract Group Abstract

Message Boards Message Boards

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

Differential Operators: Coordinate Transformations?

Posted 10 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
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
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard