Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RootSum to CHANGES & doc formatting #1149

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ By `@davidar <https://github.com/davidar>`_:
* ``PolyLog``
* ``PowersRepresentations``
* ``ReverseSort``
* ``RootSum``
* ``SeriesCoefficient``
* ``SquaresR``
* ``Subfactorial``
Expand Down
4 changes: 2 additions & 2 deletions mathics/builtin/numbers/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ class RootSum(SympyFunction):

<dl>
<dt>'RootSum[$f$, $form$]'
<dd>sums $form[x]$ for all roots of the polynomial $f[x]$.
<dd>sums $form$[$x$] for all roots of the polynomial $f$[$x$].
</dl>

>> Integrate[1/(x^5 + 11 x + 1), {x, 1, 3}]
Expand All @@ -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
Expand Down