Re: How can I handle Operator Algebra ?
- To: mathgroup at smc.vnet.net
- Subject: [mg6550] Re: How can I handle Operator Algebra ?
- From: Pasquale Nardone <pnardon at ulb.ac.be>
- Date: Tue, 1 Apr 1997 19:00:50 -0500 (EST)
- Organization: Université Libre de Bruxelles
- Sender: owner-wri-mathgroup at wolfram.com
Koichiro Yamaguchi wrote:
>
> Hello,
>
> I am a beginner user of Mathematica version 2, so following question is
> based on what I have done on Mathematica version 2.
>
> I have a question about operator algebra. I think this question might be a
> FAQ. But I could find no "answers for FAQ" of this newsgroup on my
> newsserver, and also no explanation in the S.Wolfram's "Mathematica book
> for version 3". So excuse me for asking this.
>
> According to "Mathematica book" we can treat pure functions such as those
> include some differential operators using "# and &" or "Function". Since it
> seemed both of them gave same answers, only the results using "# and &" are
> written below.
>
> I tried to make an angular momentum operator as follows.
>
> dv={D[#,x]&,D[#,y]&,D[#,z]&};
> r={x,y,z};
> Needs["Calculus`VectorAnalysis`"];
> l=CrossProduct[r,dv]
>
> And here I've got what I expected.
>
> {-(z (D[#1, y] & )) + y (D[#1, z] & ),
>
> z (D[#1, x] & ) - x (D[#1, z] & ),
>
> -(y (D[#1, x] & )) + x (D[#1, y] & )}
>
> Then I applied this operator to the length r.
>
> rl=Sqrt[ DotProduct[r,r] ];
> lx=l[[1]]
> -(z (D[#1, y] & )) + y (D[#1, z] & )
> rl // lx
>
> But Mathematica did not accept multiple "&".
> 2 2 2
> (-(z (D[#1, y] & )) + y (D[#1, z] & ))[Sqrt[x + y + z ]]
>
> In case of single "&", I could get a correct answer.
>
> lx2= (-z D[#,y] + y D[#,z])&
> -(z D[#1, y]) + y D[#1, z] &
> rl // lx2
> 0
>
> However, if I use single "&" to define differential operator vector like
> this,
>
> dv={D[#,x],D[#,y],D[#,z]}&;
>
> Mathematica rejects to recognize this as a vector. How should I I handle
> Mathematica to do some elementary operator algebra like this ?
>
> Thanks in advance for any comments and any answers.
>
> ---
> Koichiro Yamaguchi
> E-mail: tigercat at da.mbn.or.jp
Just define the angular operator as:
L[f_]:=
{y*D[f,z]-z*D[f,y],z*D[f,x]-x*D[f,z],x*D[f,y]-y*D[f,x]}
and if you would like to express it in
spherical coordinates, define the substitution:
ToRTP={
x->r*Sin[teta]*Cos[phi],
y->r*Sin[teta]*Sin[phi],
z->r*Cos[teta]};
Now you can compute the L on r:
L[Sqrt[x^2+y^2+z^2]]
{0, 0, 0}
the L on theta and phi:
PowerExpand[Simplify[L[ArcCos[z/Sqrt[x^2+y^2+z^2]]]/.ToRTP]]
{-Sin[phi], Cos[phi], 0}
PowerExpand[Simplify[L[ArcTan[y/x]]/.ToRTP]]
{-(Cos[phi] Cot[teta]), -(Cot[teta] Sin[phi]), 1}
--------------------------------------------
Pasquale Nardone *
*
Université Libre de Bruxelles *
CP 231, Sciences-Physique *
Bld du Triomphe *
1050 Bruxelles, Belgium *
tel: 650,55,15 fax: 650,57,67 (+32,2) *
http://homepages.ulb.ac.be/~pnardon/ *
,,,
(o o)
----ooO-(_)-Ooo----