Indefinite integrals of bessel function
조회 수: 17 (최근 30일)
이전 댓글 표시
I have this function that has bessel functions which has to be integrated from infinity to 0 and plot the graph between Fy and r.
Matlab returns NaN as output.

mu=4*pi*10^-7;
M=0.891*10^6;
R=5*10^-3;
s=10*10^-3;
t=5*10^-3;
syms q
r=linspace(-10*10^-3,10*10^-3,20)
func=@(q) 4*pi*M^2*mu*R^2*(besselj(1,(r.*q/R)).*besselj(1,q).^2.*sinh(q.*t/(2*R)).^2.*exp(-q.*s/R));
F=integral(func,inf,0)
plot(r,F)
%Edited:-Forgot to place F in plot.
댓글 수: 4
David Goodmanson
2021년 1월 6일
Hi Rahul,
Compared to the expression you posted, it looks func is missing a factor of epsilon. But a much more serious issue is, what happened to the factor of 1/q?
채택된 답변
Walter Roberson
2021년 1월 5일
you need ArrayValued option for integrate()
댓글 수: 2
Walter Roberson
2021년 1월 5일
mu=4*pi*10^-7;
M=0.891*10^6;
R=5*10^-3;
s=10*10^-3;
t=5*10^-3;
r=linspace(-10*10^-3,10*10^-3,20)
syms q
func=@(q) 4*pi*M^2*mu*R^2*(besselj(1,(r.*q/R)).*besselj(1,q).^2.*sinh(q.*t/(2*R)).^2.*exp(-q.*s/R));
F = vpaintegral(func(q), q, inf, 0);
plot(r,F, 'b*-')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Bessel functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
