From f137b041ea10c79dba384ceff77354d427fa1131 Mon Sep 17 00:00:00 2001 From: David A Roberts Date: Sat, 26 Oct 2024 20:23:48 +1000 Subject: [PATCH] Fix doctests --- mathics/builtin/numbers/calculus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mathics/builtin/numbers/calculus.py b/mathics/builtin/numbers/calculus.py index 73e2301b8..a9ea7c236 100644 --- a/mathics/builtin/numbers/calculus.py +++ b/mathics/builtin/numbers/calculus.py @@ -1688,7 +1688,7 @@ class RootSum(SympyFunction): >> Integrate[1/(x^5 + 11 x + 1), {x, 1, 3}] - = RootSum[41232181 #1 ^ 5 - 212960 #1 ^ 3 - 9680 #1 ^ 2 - 165 #1 - 1&, (Log[3749971 - 3512322106304 #1 ^ 4 + 453522741 #1 + 16326568676 #1 ^ 2 + 79825502416 #1 ^ 3] - 4 Log[5]) #1&] - RootSum[41232181 #1 ^ 5 - 212960 #1 ^ 3 - 9680 #1 ^ 2 - 165 #1 - 1&, (Log[3748721 - 3512322106304 #1 ^ 4 + 453522741 #1 + 16326568676 #1 ^ 2 + 79825502416 #1 ^ 3] - 4 Log[5]) #1&] + = RootSum[-1 - 212960 #1 ^ 3 - 9680 #1 ^ 2 - 165 #1 + 41232181 #1 ^ 5&, (Log[3749971 - 3512322106304 #1 ^ 4 + 453522741 #1 + 16326568676 #1 ^ 2 + 79825502416 #1 ^ 3] - 4 Log[5]) #1&] - RootSum[-1 - 212960 #1 ^ 3 - 9680 #1 ^ 2 - 165 #1 + 41232181 #1 ^ 5&, (Log[3748721 - 3512322106304 #1 ^ 4 + 453522741 #1 + 16326568676 #1 ^ 2 + 79825502416 #1 ^ 3] - 4 Log[5]) #1&] >> N[%, 50] = 0.051278805184286949884270940103072421286139857550894 @@ -1700,7 +1700,7 @@ class RootSum(SympyFunction): Use Normal to expand RootSum: >> RootSum[1+#+#^2+#^3+#^4 &, Log[x + #] &] - = RootSum[#1 ^ 4 + #1 ^ 3 + #1 ^ 2 + #1 + 1&, Log[x + #1]&] + = RootSum[1 + #1 ^ 2 + #1 ^ 3 + #1 ^ 4 + #1&, Log[x + #1]&] >> %//Normal = Log[-1 / 4 - Sqrt[5] / 4 - I Sqrt[5 / 8 - Sqrt[5] / 8] + x] + Log[-1 / 4 - Sqrt[5] / 4 + I Sqrt[5 / 8 - Sqrt[5] / 8] + x] + Log[-1 / 4 - I Sqrt[5 / 8 + Sqrt[5] / 8] + Sqrt[5] / 4 + x] + Log[-1 / 4 + I Sqrt[5 / 8 + Sqrt[5] / 8] + Sqrt[5] / 4 + x] """