level 6
Shu_lty
楼主
在求J1(\[Mu]m)=0的时候,\[Mu]m范围必须要限制在30个数以内,否则会出现
{ToRules[C[1] \[Element] Integers &&
1. <= C[1] <= 15. && \[Mu]m == BesselJZero[1., C[1]]]},很奇怪,麻烦各位老哥帮忙看看,谢谢!
代码如下:
Clear[findRoots]
Options[findRoots] = Options[Reduce];
findRoots[gl_Equal, {x_, von_, bis_},
prec : (_Integer?Positive | MachinePrecision | Infinity) :
MachinePrecision, wrap_: Identity, opts : OptionsPattern[]] :=
Module[{work, glp, vonp,
bisp}, {glp, vonp, bisp} = {gl, von, bis} /.
r_Real :> SetPrecision[r, prec];
work = wrap@Reduce[{glp, vonp <= x <= bisp}, opts];
work = {ToRules[work]};
If[prec === Infinity, work, N[work, prec]]];
Plot[BesselJ[1, x], {x, 0, 50}]
st1 = Table[findRoots[BesselJ[1, \[Mu]m] == 0, {\[Mu]m, 1, 50}]];
M = Table[\[Mu]m /. st1]
Length[Table[\[Mu]m /. st1]]
2021年12月31日 17点12分
1
{ToRules[C[1] \[Element] Integers &&
1. <= C[1] <= 15. && \[Mu]m == BesselJZero[1., C[1]]]},很奇怪,麻烦各位老哥帮忙看看,谢谢!
代码如下:
Clear[findRoots]
Options[findRoots] = Options[Reduce];
findRoots[gl_Equal, {x_, von_, bis_},
prec : (_Integer?Positive | MachinePrecision | Infinity) :
MachinePrecision, wrap_: Identity, opts : OptionsPattern[]] :=
Module[{work, glp, vonp,
bisp}, {glp, vonp, bisp} = {gl, von, bis} /.
r_Real :> SetPrecision[r, prec];
work = wrap@Reduce[{glp, vonp <= x <= bisp}, opts];
work = {ToRules[work]};
If[prec === Infinity, work, N[work, prec]]];
Plot[BesselJ[1, x], {x, 0, 50}]
st1 = Table[findRoots[BesselJ[1, \[Mu]m] == 0, {\[Mu]m, 1, 50}]];
M = Table[\[Mu]m /. st1]
Length[Table[\[Mu]m /. st1]]