Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Defining differential operator that acts like curl

Hello,

As a newbie in using SAGE (experience with Python and Numpy), I was wondering how to define a differential operator that acts like curl (or ×F). The curl for a vector field F=(Fx,Fy,Fz)is defined as a determinant det(,F). I want to define such operators that act on Fx,Fy,Fz without calculating the determinant a priori. In other words if I was to multiply x with Fy, I would expect to get Fyx

Thanks

click to hide/show revision 2
No.2 Revision

Defining differential operator that acts like curl

Hello,

As a newbie in using SAGE (experience with Python and Numpy), I was wondering how to define a differential operator that acts like curl (or ×F). The curl for a vector field F=(Fx,Fy,Fz)is defined as a determinant det(,F). I want to define such operators that act on Fx,Fy,Fz without calculating the determinant a priori. In other words if I was to multiply x with Fy, I would expect to get $\frac{\partial F_y}{\partial x}$x}$ EDIT:

Thanksclass DiffOpp(SageObject):

def __init__(self, dep_var):
    self.dep_var = dep_var

def __mul__(self, f):
    return diff(f, self.dep_var)
click to hide/show revision 3
No.3 Revision

Defining differential operator that acts like curl

Hello,

As a newbie in using SAGE (experience with Python and Numpy), I was wondering how to define a differential operator that acts like curl (or ×F). The curl for a vector field F=(Fx,Fy,Fz)is defined as a determinant det(,F). I want to define such operators that act on Fx,Fy,Fz without calculating the determinant a priori. In other words if I was to multiply x with Fy, I would expect to get Fyx EDIT:

class DiffOpp(SageObject):

class DiffOpp(SageObject):

    def __init__(self, dep_var):
     self.dep_var = dep_var

 def __mul__(self, f):
     return diff(f, self.dep_var)