ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 16 Apr 2020 07:14:36 +0200Symbolic product in Sage?https://ask.sagemath.org/question/9047/symbolic-product-in-sage/Suppose I'd like to compute
prod(1/x^4, x, 1, oo)
How can this be done?
I found an old [thread](https://groups.google.com/forum/?fromgroups#!topic/sage-support/ZLfVooTBLvw), but with no answers.Fri, 08 Jun 2012 14:13:32 +0200https://ask.sagemath.org/question/9047/symbolic-product-in-sage/Answer by mikemoore13 for <p>Suppose I'd like to compute</p>
<pre><code>prod(1/x^4, x, 1, oo)
</code></pre>
<p>How can this be done?</p>
<p>I found an old <a href="https://groups.google.com/forum/?fromgroups#!topic/sage-support/ZLfVooTBLvw">thread</a>, but with no answers.</p>
https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=13997#post-id-13997I have the same problem. If someone know how to doTue, 04 Sep 2012 04:00:32 +0200https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=13997#post-id-13997Answer by slelievre for <p>Suppose I'd like to compute</p>
<pre><code>prod(1/x^4, x, 1, oo)
</code></pre>
<p>How can this be done?</p>
<p>I found an old <a href="https://groups.google.com/forum/?fromgroups#!topic/sage-support/ZLfVooTBLvw">thread</a>, but with no answers.</p>
https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=50779#post-id-50779In Sage, `sum` serves both for Python sums and for symbolic sums,
but for products we have `prod` and `product`.
sage: product(1/x^4, x, 1, oo)
0
This should be better documented... See
- [Sage Trac ticket 29516: Cross-link the documentation of sum, prod, product](https://trac.sagemath.org/ticket/29516)Thu, 16 Apr 2020 07:14:36 +0200https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=50779#post-id-50779Answer by asteve for <p>Suppose I'd like to compute</p>
<pre><code>prod(1/x^4, x, 1, oo)
</code></pre>
<p>How can this be done?</p>
<p>I found an old <a href="https://groups.google.com/forum/?fromgroups#!topic/sage-support/ZLfVooTBLvw">thread</a>, but with no answers.</p>
https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=13703#post-id-13703I found symbolic sum but not symbolic product in the reference files.
I need to be able to classify a function of a erratic x which involve
several symbolic foodstuffs from 1 to n or whatever. I then want to be
able to do a derivative and a limit of this. I am trying out Sage
because Mathematical doesn't seem to be able to handle this stuff
exactly. I can define the function just fine but when I try to take
the limit Mathematical can't seem to handle it.
Thu, 14 Jun 2012 02:45:22 +0200https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=13703#post-id-13703Comment by bk322 for <p>I found symbolic sum but not symbolic product in the reference files.
I need to be able to classify a function of a erratic x which involve
several symbolic foodstuffs from 1 to n or whatever. I then want to be
able to do a derivative and a limit of this. I am trying out Sage
because Mathematical doesn't seem to be able to handle this stuff
exactly. I can define the function just fine but when I try to take
the limit Mathematical can't seem to handle it.</p>
https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?comment=19590#post-id-19590Am... Great, but why post it here?Thu, 14 Jun 2012 11:23:20 +0200https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?comment=19590#post-id-19590Answer by benjaminfjones for <p>Suppose I'd like to compute</p>
<pre><code>prod(1/x^4, x, 1, oo)
</code></pre>
<p>How can this be done?</p>
<p>I found an old <a href="https://groups.google.com/forum/?fromgroups#!topic/sage-support/ZLfVooTBLvw">thread</a>, but with no answers.</p>
https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=14002#post-id-14002Take the natural logarithm of your product and you get a sum which can be evaluated:
$$\ln\left( \prod_{x=1}^k \frac{1}{x^4} \right) = \sum_{x=1}^k \ln\left(\frac{1}{x^4}\right)$$
... now take the limit as $k \to \infty$:
sage: sum(ln(1/x^4), x, 1, oo)
-Infinity
sage: e^sum(ln(1/x^4), x, 1, oo)
0Wed, 05 Sep 2012 01:34:20 +0200https://ask.sagemath.org/question/9047/symbolic-product-in-sage/?answer=14002#post-id-14002