# HG changeset patch
# User Burcin Erocal <burcin@erocal.org>
# Date 1337093385 -7200
# Node ID 2a811978cf1d996463b279ff0fc95eccaa9ab53d
# Parent 329827139f0960a2427141901bd58c3315c95e46
Fix doctests after comparison of numeric coefficients in Pynac changed.
diff --git a/sage/calculus/calculus.py b/sage/calculus/calculus.py
a
|
b
|
|
353 | 353 | |
354 | 354 | sage: k = var("k") |
355 | 355 | sage: sum(1/(1+k^2), k, -oo, oo) |
356 | | 1/2*I*psi(-I) - 1/2*I*psi(I) + 1/2*I*psi(-I + 1) - 1/2*I*psi(I + 1) |
| 356 | -1/2*I*psi(I + 1) - 1/2*I*psi(I) + 1/2*I*psi(-I) + 1/2*I*psi(-I + 1) |
357 | 357 | |
358 | 358 | Ensure that ticket #8624 is fixed:: |
359 | 359 | |
diff --git a/sage/calculus/tests.py b/sage/calculus/tests.py
a
|
b
|
|
109 | 109 | sage: integrate(exp(1-x^2),x) |
110 | 110 | 1/2*sqrt(pi)*e*erf(x) |
111 | 111 | sage: integrate(sin(x^2),x) |
112 | | 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) |
| 112 | 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) |
113 | 113 | |
114 | 114 | sage: integrate((1-x^2)^n,x) |
115 | 115 | integrate((-x^2 + 1)^n, x) |
diff --git a/sage/symbolic/integration/integral.py b/sage/symbolic/integration/integral.py
a
|
b
|
|
395 | 395 | x y + Sqrt[--] FresnelS[Sqrt[--] x] |
396 | 396 | 2 Pi |
397 | 397 | sage: print f.integral(x) |
398 | | 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) |
| 398 | 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) |
399 | 399 | |
400 | 400 | Alternatively, just use algorithm='mathematica_free' to integrate via Mathematica |
401 | 401 | over the internet (does NOT require a Mathematica license!):: |
… |
… |
|
466 | 466 | see #3013:: |
467 | 467 | |
468 | 468 | sage: integrate(sin(x)*cos(10*x)*log(x), x) |
469 | | 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) |
| 469 | 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) |
470 | 470 | |
471 | 471 | It is no longer possible to use certain functions without an |
472 | 472 | explicit variable. Instead, evaluate the function at a variable, |