I need an efficient way to numerically find the first $n$ positive roots $\lambda_n$ of the transcendental equation

$$ \dfrac{J_0 (\lambda_n r) Y_1 (\lambda_n) - J_1 (\lambda_n) Y_0 (\lambda_n r)}{J_0 (\lambda_n r) Y_0 (\lambda_n) - J_0 (\lambda_n) Y_0 (\lambda_n r)} = \dfrac{\delta}{\lambda_n}$$

where $\delta$ is a constant.

I have tried newtzero and chebfun in MATLAB. They are both taking longer than I'd like. The roots are needed for the solution of a PDE (transient heat transfer in one spatial dimension) with time varying boundary conditions using eigenfunction expansions. If anyone knows of a technique to determine the roots even a little faster, it would be much appreciated. Thank you.

  • $\begingroup$ How long is it taking? Also, what is the size of the system you are solving? $\endgroup$
    – Charles
    Jul 10 '17 at 16:46
  • 4
    $\begingroup$ Using Newton's method with reasonable first guesses is probably the best method here: the lhs is almost periodic and always decreasing, the rhs is decreasing, and the equation is really well suited for it. You can get a good first guess by using an asymptotic approximation for the lhs, so perhaps that might be worth trying. $\endgroup$
    – Kirill
    Jul 10 '17 at 16:56
  • 1
    $\begingroup$ As @Kirill mentioned, you can use an asymptotic expansion of your left-hand side, or you could use an asymptotic expansion of your differential equation, as mentioned in a previous question of mine. For the 1D eigenvalue problem you could also use Finite Difference Methods. $\endgroup$
    – nicoguaro
    Jul 10 '17 at 17:38
  • 1
    $\begingroup$ I obtained a similar expression recently when computing the vibration modes of a cone. For some choice of parameters it was better to use FDM due to computation of the Bessel functions (in SciPy). $\endgroup$
    – nicoguaro
    Jul 10 '17 at 18:48
  • 2
    $\begingroup$ @LuisCosta It could happen with complicated functions that the number of iterations saved by using a higher-order method may or may not outweigh the extra cost of evaluating the more complicated functions—you wouldn't really know without testing. (The higher order only helps asymptotically, and if you only have floating-point doubles it might not matter.) $\endgroup$
    – Kirill
    Jul 10 '17 at 19:12

Your Answer

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

Browse other questions tagged or ask your own question.