# Using NSolve to get a solution for Bessel-related functions

I want to get a solution of a equation using NSolve.

$$BesselI[1,x]/(x*BesselI[0,x])=0.2$$

So I plugged this equation to NSolve:

NSolve[BesselI[1,x]/(x*BesselI[0,x])==0.2, x]


But when I use this, the Mathematica gives the same expression. I know that this equation has such a solution from plot:

Could you let me know how to solve this problem?

Any helps will be appreciated. Thank you!

Bound the value for x

Solve[{BesselI[1, x]/(x*BesselI[0, x]) == 1/5, -5 < x < 5}, x]

(* {{x -> Root[{(-5) BesselI[1, #] +
BesselI[
0, #] #& , -4.3841171103147230452670268022216567473418.}]}, {x ->
Root[{(-5) BesselI[1, #] + BesselI[0, #] #& ,
4.3841171103147230452670268022216567473418.}]}} *)

NSolve[{BesselI[1, x]/(x*BesselI[0, x]) == 1/5, -5 < x < 5}, x]

(* {{x -> -4.38412}, {x -> 4.38412}} *)

• Thank you! Is there any reason that the code doesn't work when I don't bound the value of x? Commented Sep 14, 2021 at 15:50
• By default Mathematica assumes that all variables are complex. It doesn't know how to solve the equation in the complex plane. Even if you specify that x is real, it still doesn't know how to solve the equation. Restricting the range makes the problem simpler and enables Mathematica to find the roots. Commented Sep 14, 2021 at 15:54

Often the solver of NMinimizeis more robust and calculates one solution

NMinimize[{1, BesselI[1, x]/(x*BesselI[0, x]) == 0.2}, x]
(*{1., {x -> -4.38412}}*)


without restriction.

Second solution follows to

NMinimize[{1, BesselI[1, x]/(x*BesselI[0, x]) == 0.2,x>0}, x]
(*{1., {x -> 4.38412}}*)

• Or NArgMin[{(BesselI[1, x]/(x*BesselI[0, x]) - 1/5)^2, #}, x] & /@ {x < 0, x > 0} Commented Sep 14, 2021 at 20:16