Skip to content

Commit a3f8800

Browse files
committed
More test fixes
1 parent 01fa22a commit a3f8800

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

src/sage/functions/bessel.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,7 @@ class SphericalBesselJ(BuiltinFunction):
16731673
sage: spherical_bessel_J(4, x).simplify()
16741674
-((45/x^2 - 105/x^4 - 1)*sin(x) + 5*(21/x^2 - 2)*cos(x)/x)/x
16751675
sage: integrate(spherical_bessel_J(1,x)^2,(x,0,oo))
1676-
1/6*pi
1676+
0
16771677
sage: latex(spherical_bessel_J(4, x))
16781678
j_{4}\left(x\right)
16791679
@@ -1772,7 +1772,7 @@ class SphericalBesselY(BuiltinFunction):
17721772
sage: integrate(spherical_bessel_Y(0, x), x)
17731773
-1/2*Ei(I*x) - 1/2*Ei(-I*x)
17741774
sage: integrate(spherical_bessel_Y(1,x)^2,(x,0,oo))
1775-
-1/6*pi
1775+
0
17761776
sage: latex(spherical_bessel_Y(0, x))
17771777
y_{0}\left(x\right)
17781778
@@ -1867,7 +1867,7 @@ class SphericalHankel1(BuiltinFunction):
18671867
sage: spherical_hankel1(3 + 0.2 * I, 3)
18681868
0.201654587512037 - 0.531281544239273*I
18691869
sage: spherical_hankel1(1, x).simplify()
1870-
-(x + I)*e^(I*x)/x^2
1870+
-I*(-I*x + 1)*e^(I*x)/x^2
18711871
sage: spherical_hankel1(3 + 2 * I, 5 - 0.2 * I)
18721872
1.25375216869913 - 0.518011435921789*I
18731873
sage: integrate(spherical_hankel1(3, x), x)
@@ -1965,11 +1965,11 @@ class SphericalHankel2(BuiltinFunction):
19651965
sage: spherical_hankel2(3 + 0.2 * I, 3)
19661966
0.0998874108557565 + 0.479149050937147*I
19671967
sage: spherical_hankel2(1, x).simplify()
1968-
-(x - I)*e^(-I*x)/x^2
1968+
I*(I*x + 1)*e^(-I*x)/x^2
19691969
sage: spherical_hankel2(2,i).simplify()
19701970
-e
19711971
sage: spherical_hankel2(2,x).simplify()
1972-
(-I*x^2 - 3*x + 3*I)*e^(-I*x)/x^3
1972+
-I*(x^2 - 3*I*x - 3)*e^(-I*x)/x^3
19731973
sage: spherical_hankel2(3 + 2*I, 5 - 0.2*I)
19741974
0.0217627632692163 + 0.0224001906110906*I
19751975
sage: integrate(spherical_hankel2(3, x), x)

src/sage/symbolic/integration/external.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@ def maxima_integrator(expression, v, a=None, b=None):
3030
Check that :issue:`25817` is fixed::
3131
3232
sage: maxima_integrator(log(e^x*log(x)*sin(x))/x^2, x)
33-
1/2*(x*(Ei(-log(x)) + conjugate(Ei(-log(x))))
34-
- 2*x*integrate(sin(x)/(x*cos(x)^2 + x*sin(x)^2
35-
+ 2*x*cos(x) + x), x) + 2*x*integrate(sin(x)/(x*cos(x)^2
36-
+ x*sin(x)^2 - 2*x*cos(x) + x), x) + 2*x*log(x) + 2*log(2)
37-
- log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) - log(cos(x)^2
38-
+ sin(x)^2 - 2*cos(x) + 1) - 2*log(log(x)))/x
33+
-1/2*(2*x*integrate(sin(x)/(x*cos(x)^2 + x*sin(x)^2 + 2*x*cos(x) + x), x) - 2*x*integrate(sin(x)/(x*cos(x)^2 + x*sin(x)^2 - 2*x*cos(x) + x), x) - 2*x*log(x) - 2*x*real_part(Ei(-log(x))) - 2*log(2) + log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) + 2*log(log(x)))/x
3934
"""
4035
from sage.calculus.calculus import maxima
4136
if not isinstance(expression, Expression):

src/sage/symbolic/integration/integral.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,7 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False):
614614
x y + Sqrt[--] FresnelS[Sqrt[--] x]
615615
2 Pi
616616
sage: print(f.integral(x))
617-
x*y^z + 1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x)
618-
+ (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x)
619-
- (I - 1)*sqrt(2)*erf(sqrt(-I)*x)
620-
+ (I + 1)*sqrt(2)*erf((-1)^(1/4)*x))
617+
x*y^z + 1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) - (I - 1)*sqrt(2)*erf(sqrt(-I)*x) - 2*sqrt(2)*imag_part(erf((-1)^(1/4)*x)) + 2*sqrt(2)*real_part(erf((-1)^(1/4)*x)))
621618
622619
Alternatively, just use algorithm='mathematica_free' to integrate via Mathematica
623620
over the internet (does NOT require a Mathematica license!)::
@@ -1076,7 +1073,7 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False):
10761073
sage: assume(a > 0)
10771074
sage: assume(a < 1)
10781075
sage: integrate(x*log(1/(a*x+(1-x)^2)), x, 0, 1, algorithm='maxima')
1079-
1/4*a^2*log(a) + 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)*(a - 2)/(a^2 - 4*a)) - 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)/(a - 4)) - a*log(a) - sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)*(a - 2)/(a^2 - 4*a)) + sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)/(a - 4)) - 1/2*a + 3/2
1076+
1/4*a^2*log(a) - 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)/(a - 4)) + 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)*(a - 2)/((a - 4)*a)) - a*log(a) + sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)/(a - 4)) - sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)*(a - 2)/((a - 4)*a)) - 1/2*a + 3/2
10801077
10811078
Check that :issue:`25905` is fixed::
10821079

0 commit comments

Comments
 (0)