1
$\begingroup$

enter image description hereI am a complete beginner to Mathematica. I am trying to evaluate a Fourier integral (see below). Here $\mu(\vec{r})$ is a mass density with units $[\frac{u}{mm^3}]$, and its Fourier transform is defined as

$\mu(\vec{k}) = \mu(\vec{k}_p, k_z) = \int_0^Rdr\int_0^{2\pi}d\phi\int_0^ddz e^{-i\left(k_zz + k_p rcos(\phi)\right)}r\mu(\vec{r})$,

where the integral is evaluated in cylindrical coordinates and the $r$ is due to the Jacobi determinant.

FT[mu_, R_, d_, kz_, kp_] := 
 Integrate[r*mu*e^(-i*kz*z)*e^(-i*kp*r*Cos[\[Phi]]),
  {r, 0, R}, {\[Phi], 0, 2 Pi}, {z, 0, d}]
FT[\[Mu], R, d, kz, kp]

I get the following errors:

Integrate::units: Integrate was unable to determine the units of quantities that appear in the input.

Equal::nord2: Comparison of \!\(\*TemplateBox[{\"0.25`\", \"\\\"mm\\\"\", \
\"millimeters\", \"\\\"Millimeters\\\"\"},\"Quantity\"]\) and 1 is \
invalid"

Integrate::idiv: Integral of Sec[\[Phi]]^2 does not converge on {0,\[Pi]}"

$\endgroup$
11
  • 1
    $\begingroup$ You need to use correct syntax for it to work. Try FT[mu_, R_, d_, kz_, kp_] := Integrate[ r*mu*Exp[-I*kz*z]*Exp[-I*kp*r*Cos[\[Phi]]], {r, 0, R}, {\[Phi], 0, 2 Pi}, {z, 0, d}] $\endgroup$
    – Nasser
    Commented Mar 19, 2022 at 14:54
  • $\begingroup$ E is $e$, Iis $I$.... $\endgroup$
    – Michael E2
    Commented Mar 19, 2022 at 14:54
  • $\begingroup$ Ok, some error messages are now gone. However, the first one (unable to determine inputs) still prevails. But thanks so far. $\endgroup$ Commented Mar 19, 2022 at 14:59
  • 1
    $\begingroup$ can you show screen shot of what you get? Here is mine !Mathematica graphics no errors. Make sure to start with clean kernel. $\endgroup$
    – Nasser
    Commented Mar 19, 2022 at 15:06
  • $\begingroup$ @Nasser Added it to the question $\endgroup$ Commented Mar 19, 2022 at 15:10

0