2
$\begingroup$

I'm new to Bessel functions, especially those of the first kind. I'm working with a problem that goes as such:

enter image description here enter image description here

With that said, is my code for said problem correct?

α = 0.5; β = 0.3; M = 12;
m = Range[M];
γ = N[BesselJZero[m, M]];
g = (BesselJ[1, m]/(γ^2 (BesselJ[1, m])^2)) BesselJ[
    1, γ]*Tanh[β*γ];
Total[g]
$\endgroup$
6
  • $\begingroup$ What do you mean by $\gamma_m$, BesselJZero[1,m]? There is Bessel[1, $\gamma_m$] both in numerator and denominator in the definition of g, so it seems that your definitione isn`t optimal, is it?. $\endgroup$
    – Artes
    Dec 29, 2019 at 23:59
  • $\begingroup$ That's what I thought too, but I don't know what is considered the "inverse" of the Bessel function to solve for γm $\endgroup$
    – TexMexDex
    Dec 30, 2019 at 0:14
  • $\begingroup$ Your comment isn't clear, there is no inverse function in your definition of g. $\endgroup$
    – Artes
    Dec 30, 2019 at 0:19
  • 1
    $\begingroup$ You have coded BesselJ[ 1, m ], where $m$ is a range of integers. The formula contains a different expression. You have also coded BesselJZero[ m, M ], which will give the 12th zero of each function $J_1, J_2, J_3, ... J_{12}$ . $\endgroup$
    – LouisB
    Dec 30, 2019 at 3:14
  • 1
    $\begingroup$ Ooooooooh now I get it. The BesselJZero[] was the "inverse" I was looking for! Now that I know that the function is Listable and what I was missing, I can solve proper. $\endgroup$
    – TexMexDex
    Dec 30, 2019 at 3:22

2 Answers 2

2
$\begingroup$

I don't think you code is correct.

  1. You have left α out your term definition.

  2. m shouldn't be defined as a range, but kept as an unevaluated indexing variable.

  3. γ needs to be a function of the index m defined as:

    γ[m_] := N[BesselJZero[0, m]]

  4. You should use Sum in place of Total.

With these changes a term of g becomes

term[m_] := BesselJ[1, α γ[m]] Tanh[β γ[m]] / BesselJ[1, γ[m]] / γ[m]^2

and g, itself, is evaluated by

α = 0.5; β = 0.3; mMax = 12;
g = Sum[term[m], {m, mMax}]

0.064631

Update

The following is added to address concerns raised by the OP in a comment to this answer.

The value of γ[m] for a positive integer m is the value at which the m-th zero occurs in BesselJ[0, z]. That this is indeed so can seen by

BesselJ[0, #] & /@ γ /@ Range[mMax] // Chop
>`{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}`

These values, γ /@ Range[mMax], do not necessarily correspond to zeros of BesselJ[1, z].

$\endgroup$
1
  • $\begingroup$ Oh darn, I am missing a variable. But I'm confused tho, how it that you interpret the Bessel Zero function to make the gamma variables when the gamma variables are suppose to make zeros when given gamma terms? $\endgroup$
    – TexMexDex
    Dec 30, 2019 at 3:02
3
$\begingroup$

Thanks to m_goldberg for the help! But given that the book didn't specify the Sum[] function, here's a version with Total[] instead, which yields the same answer regardless:

α = 0.5; β = 0.3; M = 12;
m = Range[M];
γ = N[BesselJZero[0, m]];
g = (BesselJ[1, α γ]/(γ^2 (BesselJ[1, γ])^2)) BesselJ[1, γ]*Tanh[β*γ];
Total[g]
$\endgroup$
1
  • 1
    $\begingroup$ This is good, It makes use of Listable attribute of numeric functions such as BesselJZero and BesselJ. $\endgroup$
    – m_goldberg
    Dec 30, 2019 at 3:46

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