# integral containing products of bessel functions

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 close merge delete

Sort by » oldest newest most voted

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))
9.28524600427786

more

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

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