# Ticket #12950: trac_12950-numeric_comparison_doctest_fixes-trac.patch

File trac_12950-numeric_comparison_doctest_fixes-trac.patch, 2.4 KB (added by jpflori, 9 years ago)
• ## sage/calculus/calculus.py

```# HG changeset patch
# User Burcin Erocal <burcin@erocal.org>
# Date 1337093385 -7200
# Node ID 2a811978cf1d996463b279ff0fc95eccaa9ab53d
# Parent  329827139f0960a2427141901bd58c3315c95e46
Trac #12950: Fix doctests after comparison of numeric coefficients in Pynac
changed.

diff --git a/sage/calculus/calculus.py b/sage/calculus/calculus.py```
 a sage: k = var("k") sage: sum(1/(1+k^2), k, -oo, oo) 1/2*I*psi(-I) - 1/2*I*psi(I) + 1/2*I*psi(-I + 1) - 1/2*I*psi(I + 1) -1/2*I*psi(I + 1) - 1/2*I*psi(I) + 1/2*I*psi(-I) + 1/2*I*psi(-I + 1) Ensure that ticket #8624 is fixed::
• ## sage/calculus/tests.py

`diff --git a/sage/calculus/tests.py b/sage/calculus/tests.py`
 a sage: integrate(exp(1-x^2),x) 1/2*sqrt(pi)*e*erf(x) sage: integrate(sin(x^2),x) 1/8*((I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) + (I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x))*sqrt(pi) 1/8*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x))*sqrt(pi) sage: integrate((1-x^2)^n,x) integrate((-x^2 + 1)^n, x)
• ## sage/symbolic/integration/integral.py

`diff --git a/sage/symbolic/integration/integral.py b/sage/symbolic/integration/integral.py`
 a x y  + Sqrt[--] FresnelS[Sqrt[--] x] 2                 Pi sage: print f.integral(x) y^z*x + 1/8*((I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) + (I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x))*sqrt(pi) y^z*x + 1/8*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x))*sqrt(pi) Alternatively, just use algorithm='mathematica_free' to integrate via Mathematica over the internet (does NOT require a Mathematica license!):: see #3013:: sage: integrate(sin(x)*cos(10*x)*log(x), x) 1/198*(11*cos(9*x) - 9*cos(11*x))*log(x) + 1/44*Ei(-11*I*x) - 1/36*Ei(-9*I*x) - 1/36*Ei(9*I*x) + 1/44*Ei(11*I*x) 1/198*(11*cos(9*x) - 9*cos(11*x))*log(x) + 1/44*Ei(-11*I*x) + 1/44*Ei(11*I*x) - 1/36*Ei(-9*I*x) - 1/36*Ei(9*I*x) It is no longer possible to use certain functions without an explicit variable.  Instead, evaluate the function at a variable,