Ask Your Question

integral containing products of bessel functions

asked 2017-06-07 20:55:07 -0500

I am trying to find a closed form expression of an integral containing a product of bessel functions. Sage returns my command instead of a solution. Any help is appreciated. My code is below. I am solving this on a free CoCalc server.

phi, l, R, r_bar= var('phi l R r_bar')
phi = bessel_J(0, l*R) - (bessel_J(0,l*r_bar)*bessel_Y(0,l*R))/(bessel_Y(0,l*r_bar))
f = R*phi*phi
integrate(f, R)
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2017-06-09 01:00:50 -0500

mforets gravatar image

updated 2017-06-09 11:47:43 -0500

in v.8.0.beta9 and in v.7.6., i'm getting:

sage: phi, l, R, r_bar= var('phi l R r_bar')
sage: phi = bessel_J(0, l*R) - (bessel_J(0,l*r_bar)*bessel_Y(0,l*R))/(bessel_Y(0,l*r_bar))
sage: f = R*phi*phi
sage: ans = integrate(f, R, algorithm='sympy'); ans   # coffee break
1/2*R^2*bessel_J(1, R*l)^2 + 1/2*R^2*bessel_J(0, R*l)^2 + 1/2*R^2*bessel_J(0, l*r_bar)^2*bessel_Y(1, R*l)^2/bessel_Y(0, l*r_bar)^2 + 1/2*R^2*bessel_J(0, l*r_bar)^2*bessel_Y(0, R*l)^2/bessel_Y(0, l*r_bar)^2 - R^2*bessel_J(1, R*l)*bessel_J(0, l*r_bar)*bessel_Y(1, R*l)/bessel_Y(0, l*r_bar) - R^2*bessel_J(0, R*l)*bessel_J(0, l*r_bar)*bessel_Y(0, R*l)/bessel_Y(0, l*r_bar)

and view(factor(ans)) is

$$ \frac{{\left(J_{0}(l r_{\mathit{bar}})^{2} Y_{1}(R l)^{2} + J_{0}(l r_{\mathit{bar}})^{2} Y_{0}(R l)^{2} - 2 J_{1}(R l) J_{0}(l r_{\mathit{bar}}) Y_{1}(R l) Y_{0}(l r_{\mathit{bar}}) - 2 J_{0}(R l) J_{0}(l r_{\mathit{bar}}) Y_{0}(R l) Y_{0}(l r_{\mathit{bar}}) + J_{1}(R l)^{2} Y_{0}(l r_{\mathit{bar}})^{2} + J_{0}(R l)^{2} Y_{0}(l r_{\mathit{bar}})^{2}\right)} R^{2}}{2 Y_{0}(l r_{\mathit{bar}})^{2}} $$

sanity check:

sage: numerical_integral(f.subs(l=1, r_bar=1), 0.1, 1)
(9.285246004277859, 1.0308693903258014e-13)
sage: N(ans.subs(R=1, l=1, r_bar=1) - ans.subs(R=0.1, l=1, r_bar=1))
edit flag offensive delete link more


Selecting sympy gives me an answer unlike the default of maxima. Thank you!

RieszRepresent gravatar imageRieszRepresent ( 2017-06-11 15:49:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-06-07 20:55:07 -0500

Seen: 37 times

Last updated: Jun 09