# How can I get a numerical solution with Bessel functions?

I am trying to get the series of numerical solutions, with BesselJ functions. which is,

Solve[x BesselJ[1, x] == t BesselJ[0, x], x]

where t is just some constant. Solve, NSolve, NSolveValues does not work at all. It says

This system cannot be solved with the methods available to Solve.

How can I get any solutions from the equation? at least some of them?

The indicating a range of x helps:

f[t_?NumericQ] := NSolve[{x BesselJ[1, x] == t *BesselJ[0, x] && x >= -10 && x <= 10}, x]
f[3.3]


{{x -> -7.4445}, {x -> -4.50817}, {x -> -1.82984}, {x -> 1.82984}, {x -> 4.50817}, {x -> 7.4445}}

• Thank you. it was truely helpful
– BY G
Jul 27 at 8:17
Clear["Global*"]

eqn[t_] = x BesselJ[1, x] == t BesselJ[0, x];


As suggested by user64494, for a given t, constrain x to an interval. However, use Solve

Solve[{eqn[0], -15 < x < 15}, x] // N // Quiet

(* {{x -> 0.}, {x ->
0.}, {x -> -13.3237}, {x -> -10.1735}, {x -> -7.01559}, {x -> -3.83171}, \
{x -> 3.83171}, {x -> 7.01559}, {x -> 10.1735}, {x -> 13.3237}} *)


Note that NSolve may miss a solution

NSolve[{eqn[0], -15 < x < 15}, x]

(* {{x -> -13.3237}, {x -> -10.1735}, {x -> -7.01559}, {x -> -3.83171}, {x ->
3.83171}, {x -> 7.01559}, {x -> 10.1735}, {x -> 13.3237}} *)


Use ContourPlot to see the solutions

cp = ContourPlot[Evaluate@eqn[t],
{x, -15, 15}, {t, -5, 5},
FrameLabel -> (Style[#, 12, Bold] & /@ {x, t})];

Manipulate[
t = Rationalize[tt, 0];
sol = x /. Solve[{eqn[t], -15 < x < 15}, x] // Quiet;
Show[cp,
Graphics[{Red, AbsolutePointSize[4],
Tooltip[Point[{#, tt}], N@#] & /@ sol}],
ImageSize -> Medium],
{{tt, 0, "t"}, -5, 5, 0.1, Appearance -> "Labeled"},
SynchronousUpdating -> False]


• In fact, Solve switches to NSolve in the above, producing something like x -> Root[{ 33 BesselJ[0, #] - 10 BesselJ[1, #] #& , -7.44450249554839595179.5}. ]. BTW, t==0 is a special case and there is a command BesselJZero` to this end. Jul 27 at 12:27
• Thank you a lot!
– BY G
Aug 2 at 2:47