MATLAB - solving equation with Bessel function

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 3K views
kravky
Messages
22
Reaction score
3
Hello,

i am trying to solve this equation for x

besselj(0,0.5*x)*bessely(0,4.5*x)-besselj(0,4.5*x)*bessely(0,0.5*x) ==0;

I tried vpasolve, but it gave me answer x=0 only. fzero function didnt work, too.
What function can solve this equation?

Thanks
 
on Phys.org
Yes. I misused fzero function. now it works for me aswell!
Code:
function ffu = f(x)
ffu = besselj(0,0.5*x)*bessely(0,4.5*x) - besselj(0,4.5*x)*bessely(0,0.5*x);

and fzero
Code:
fun=@f
x0=2;
S=fzero(fun,x0)

will find solution. It finds only one solution which is close to the x0 value but its not the problem.
 
I understand. A good way is to use ezplot as well for a rough estimation of points, where functions is zero (intersection with x axis) and then use this rough guess as x0 input in fzero for precise value