Coercing mathematica to symbolically evaluate a spherical polar curl expression?
I'm attempting Mathematica programming, and thought I'd try a calculation that I did by hand manually (a magnetic field phasor calculation from an E&M class), using spherical polar coordinates. I've created a variable and tried to take it's curl:
Needs["VectorAnalysis`"]
SetCoordinates[Spherical]
SetAttributes[ k, Constant ]
eE := {0, 0, (Sin[Ttheta]/Rr) ( 1 - I/(k Rr)) e^{I k Rr}}
Curl[ eE ]
This doesn't actually evaluate the derivatives like I thought it would, giving only:
I k Rr
e (-I + k Rr) Sin[Ttheta]
\[Curl]{0, 0, {-------------------------------}}
2
k Rr
Basically, it is just spitting my input b开发者_如何学运维ack out to me as output. Simplify and FullSimplify don't change the result.
One guess that I had was that this was because I hadn't specified k as a constant so I added that (as above), but this didn't make a difference.
change e^{I k Rr} to E^(I k Rr).
{}means a vector, and Mathematica accepts vectors for all its functions, but outputs a vector, which is not what you want. For example,e^{1,2,3}becomes{e^1, e^2, e^3}. Thus the way you written the expression you have a one element list in position three of the first list, which throw Mathematica off.The constant e is
Ein Mathematica.
Two problems:
First, in Mathematica the symbol E, not e, is the exponential constant e.
Second, you're raising E to the power of a list ({...}, aka List[...]), where I think you instead meant to use parens:
In[17]:= eE:={0,0,(Sin[Ttheta]/Rr) (1-I/(k Rr)) E^(I k Rr)}
In[18]:= Curl[eE]
Out[18]= {(2 E^(I k Rr) (1-I/(k Rr)) Cos[Ttheta])/Rr^2, (Csc[Ttheta]
(-I E^(I k Rr) k (1-I/(k Rr)) Sin[Ttheta]^2-(I E^(I k Rr)
Sin[Ttheta]^2)/(k Rr^2)))/Rr,0}
HTH!
加载中,请稍侯......
精彩评论