1
$\begingroup$

My problem can be easily solved without Mathematica, however, I am curious how to do it in Mathematica. Moreover, I can be stuck with a similar, but more cumbersome problems in the future.

Following this topic, I defined the two complex differential operators of interest:

b1[r_, ph_] = Exp[I ph] (D[#, r] + I/r D[#, ph]) &
b2[r_, ph_] = Exp[-I ph] (D[#, r] - I/r D[#, ph]) &  

Now I can easily apply those to any functions of interest: b1[r, ph][r^3].

Now I want to define an operator that is a product (more precisely, superposition) of the two operators above. Note, that in my case the superposition is Laplacian operator in polar coordinates.

I've tried to do:

b3[r_, ph_] = b1[r, ph][b2[r, ph] [&]]

And some similar things. Can anyone help me to figure out how to define operators' superposition (so that b3[r, ph][r^3] would return me the expression of interest)?

$\endgroup$
  • 3
    $\begingroup$ How about using Composition: b3[r_, ph_] = b1[r,ph]@*b2[r,ph]? This is pretty close to what you almost had: b3[r_, ph_] = (b1[r, ph][b2[r, ph] [#]]&). $\endgroup$ – jjc385 Nov 10 '17 at 23:50
  • $\begingroup$ Thanks, that works for me. You can post this as an answer if you'd like $\endgroup$ – Mikhail Genkin Nov 14 '17 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.