Ask Your Question

Revision history [back]

in v.8.0.beta9 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: integrate(f, R, algorithm='sympy')   # 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)

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

in v.8.0.beta9 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') 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)

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

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)

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

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)

ans 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

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)

ans and view(factor(ans)) is: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