Derivative of Bessel function at x=0.

14 visualizaciones (últimos 30 días)
Selçuk Sehitoglu
Selçuk Sehitoglu el 15 de Mayo de 2022
Comentada: Star Strider el 21 de Mayo de 2022
Hello everyone,
I would like to change the expression of derivative of besselj function, because embedded expression is leading some problems.
syms nu x
y=besselj(nu,x);
d_y=diff(y,x);
subs(d_y,x,0); % At this row i get "Division by zero." error, because derivative is defined as -nJ(n,x)/x - J(n-1,x) in MATLAB and it is undefined at x=0.
However, the answer is available with the following expression (mathematically):
-(besselj(n-1,x) - besselj(n+1,x))/2
Is there a way to use this expression?
Thanks in advance,
Ozi

Respuesta aceptada

Star Strider
Star Strider el 15 de Mayo de 2022
One option is to use the limit function, however tha does not always produce a numeric result.
I ususally cheat and use eps instead.
syms nu x
y(x) = besselj(nu,x);
d_y = diff(y,x)
d_y(x) = 
d_y0 = limit(d_y,x,0)
d_y0 = 
d_y0 = d_y(eps) % Cheat With 'eps'
d_y0 = 
d_y0 = vpa(d_y0)
d_y0 = 
Since ν is undefined, a double result is not possible.
.
  2 comentarios
Selçuk Sehitoglu
Selçuk Sehitoglu el 21 de Mayo de 2022
Thanks a lot !!!
Star Strider
Star Strider el 21 de Mayo de 2022
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Bessel functions en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by