3
$\begingroup$

I am using Mathematica 12.1.1 and am unable to get the correct result for a simple laplacian in 3D Cylindrical Coordinates. I want to reproduce the following result on Mathematica:Desired result

But, I am only getting the second term from the above result. Here's the code I am using:

APotential = {A0/(k r) Sin[k z - ω t], 0, 0};

Laplacian[APotential, {r, θ, z}, "Cylindrical"]

(* OUTPUT IS: {-((A0 k Sin[k z-t ω])/r),0,0} *)

Is this because of a bug, or am I missing something?

$\endgroup$
3
  • $\begingroup$ Hi, you made a typo. In the definition of the pot. the angle is called: t, but in the Laplacian the angle is called theta. $\endgroup$ Dec 9 '20 at 20:03
  • 1
    $\begingroup$ @DanielHuber I believe t is time, not the angle theta. $\endgroup$
    – Bill Watts
    Dec 9 '20 at 22:17
  • $\begingroup$ Yup, as @BillWatts said, t refers to time, while θ is the azimuth angle. $\endgroup$ Dec 10 '20 at 3:42
3
$\begingroup$

The Laplacian takes a scalar argument, so if you want to take the Laplacian of a vector you need to do each component separately. This works:

Ar[r_, θ_, z_] = A0/(k r) Sin[k z - ω t]

Laplacian[Ar[r, θ, z], {r, θ, z}, "Cylindrical"]
(*(A0 Sin[k z - t ω])/(k r^3) - (A0 k Sin[k z - t ω])/r*)
$\endgroup$
4
  • $\begingroup$ Oh, thanks a lot! So, if Aθ and Az were non zero as well, would I have to calculate them separately and then add the final results? $\endgroup$ Dec 10 '20 at 3:40
  • 2
    $\begingroup$ To be honest, I've never seen them added together, and I'm not sure what that would be physically. Assigning the pieces to vector components would be OK if you really need them to form a vector. $\endgroup$
    – Bill Watts
    Dec 10 '20 at 6:36
  • $\begingroup$ Ah alright. Thank you again $\endgroup$ Dec 10 '20 at 17:45
  • 1
    $\begingroup$ You are welcome. But I am puzzled at Mathematica's answer to your code. It seems to me that if it cannot calculate the Laplacian for a vector, it should return unevaluated, rather than return the wrong answer. $\endgroup$
    – Bill Watts
    Dec 11 '20 at 1:20
1
$\begingroup$

For general vector field {f[r, t, z], g[r, t, z], h[r, t, z]}, the Laplacian is

Laplacian[{f[r, t, z], g[r, t, z], h[r, t, z]}, {r, t, z}, 
  "Cylindrical"] // Expand

So we write

APotential = {A0/(k r) Sin[k z - ω t], 0, 0};
Laplacian[APotential, {r, t, z}, "Cylindrical"] // Expand
$\endgroup$
1
  • 1
    $\begingroup$ Hi, actually the azimuth angle is θ, while t refers to time. So the basis will be {r, θ, z} and not {r, t, z}. That still gives an error. However, Bill's answer worked well instead. Thank you nevertheless. $\endgroup$ Dec 10 '20 at 3:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.