Here is my equation

x^2 + BesselJ[m,k*x^2]*x + k*BesselK[m,k]==0. 

I would like to solve this equation for different initial guesses of x_0 like x_0 = 1,2 etc, where m is a constant, and is 2, (m =2) and k is a variable in the range of 1 to 5.

Here I want to plot the roots of x over a range of k (from 1 to 5).

  • $\begingroup$ Check out FindRoot $\endgroup$
    – QuantumDot
    Nov 5 '15 at 7:16
  • $\begingroup$ The answers below both note the lack of real roots. There may be complex roots, but you'll need to do some more work... but, how exactly did you encounter this function? $\endgroup$
    – J. M.'s torpor
    Nov 5 '15 at 8:18

If you plot the left-hand part of your equation for m=2 and play with the kvalues:

 Plot[x^2 + BesselJ[m, k*x^2]*x + k*BesselK[m, k], {x, -5, 5}, 
  PlotRange -> {0, pr}],
 {k, 0.1, 5}, {pr, 0.1, 5}]

you will see something like this

enter image description here

and playing with the PlotRange fixed by pryou will see that the equation is likely to have no solutions, at least in the range of parameters I have chosen. So the question to answer here is, if this equation has any solution at all.

Have fun!

  • $\begingroup$ It is an equation which we arrived after solving few equations and we are looking for its solutions. I am not interested in using manipulating solution plot, I just want to find a root by giving an initial guess to x. $\endgroup$ Nov 5 '15 at 8:49
  • $\begingroup$ @Vemula Ramakrishna Reddy You probably did not understand me. It is not manipulation that I demonstrate, but manipulation helps one to make sure that your equation likely has no solutions. Or at least I would make a special search for conditions at which such a solution might exist. $\endgroup$ Nov 5 '15 at 10:12
  • $\begingroup$ Dear Alexei Boulbitch, thank you for your valuable help. I just want to ask you one thing can I collect roots of this equation, hope it has roots. Can you tell me how to solve this one using NSolve numerically $\endgroup$ Nov 6 '15 at 7:34
  • $\begingroup$ @Vemula Ramakrishna Reddy NSolve has nothing to do with your equation. You may use FindRoot to look for numerical solutions. The latter, however, requires an initial guess as an input. To give such, it would be useful to know, where approximately lies the root. For that you typically plot the left-hand part of the equation and see where does it cross the x axis. That's what I did above. As I see at k<=5 it does not. I would check for larger k at your place. Further, I see that the point of minimum of the left-hand part is at r=0. See the continuation $\endgroup$ Nov 6 '15 at 8:14
  • $\begingroup$ Continuation: Then I would check at which k this point touches the Ox axis. This yields the following equation: D[x^2 + BesselJ[m, k*x^2]*x + k*BesselK[m, k], x] == 0 // FullSimplify . It should be solved together with your original one. Usually, this is easier than to solve the original one. Judging by eye, the minimum point is at x=0. If so, you do not need to use the second equation, but simply substitute x=0 into the first one. This yields k BesselK[2, k] which is positive at any k. So this also tells me that there is likely to be no solution. $\endgroup$ Nov 6 '15 at 8:23

By varying the controls, from the Plot you can see that there are no real roots in the interval.

 f[m_, k_, x_] = x^2 + BesselJ[m, k*x^2] x + k BesselK[m, k];
   NMinimize[{f[m, k, x], 0 <= x <= 5}, x],
   Plot[f[m, k, x], {x, 0, 5}]}],
 {{m, 2}, Range[0, 5]},
 {{k, 5}, 1, 5, Appearance -> "Labeled"}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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