From cdaf6dd0a6a9e55983ac6c7d1b00b373670ed0c5 Mon Sep 17 00:00:00 2001 From: rocky Date: Tue, 29 Oct 2024 18:42:35 -0400 Subject: [PATCH] Add RootSum to CHANGES & doc formatting --- CHANGES.rst | 1 + mathics/builtin/numbers/calculus.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index d08a40008..9c4713370 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -30,6 +30,7 @@ By `@davidar `_: * ``PolyLog`` * ``PowersRepresentations`` * ``ReverseSort`` +* ``RootSum`` * ``SeriesCoefficient`` * ``SquaresR`` * ``Subfactorial`` diff --git a/mathics/builtin/numbers/calculus.py b/mathics/builtin/numbers/calculus.py index 1f07a2c37..d638be758 100644 --- a/mathics/builtin/numbers/calculus.py +++ b/mathics/builtin/numbers/calculus.py @@ -1704,7 +1704,7 @@ class RootSum(SympyFunction):
'RootSum[$f$, $form$]' -
sums $form[x]$ for all roots of the polynomial $f[x]$. +
sums $form$[$x$] for all roots of the polynomial $f$[$x$].
>> Integrate[1/(x^5 + 11 x + 1), {x, 1, 3}] @@ -1718,7 +1718,7 @@ class RootSum(SympyFunction): >> RootSum[#^5 - 3 # - 7 &, Sin] //N//Chop = 0.292188 - Use Normal to expand RootSum: + Use 'Normal' to expand 'RootSum': >> RootSum[1+#+#^2+#^3+#^4 &, Log[x + #] &] = RootSum[1 + #1 ^ 2 + #1 ^ 3 + #1 ^ 4 + #1&, Log[x + #1]&] >> %//Normal