Ask Your Question
1

Symbolic product in Sage?

asked 2012-06-08 14:13:32 +0100

bk322 gravatar image

Suppose I'd like to compute

prod(1/x^4, x, 1, oo)

How can this be done?

I found an old thread, but with no answers.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
4

answered 2012-09-05 01:34:20 +0100

benjaminfjones gravatar image

Take 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)
0
edit flag offensive delete link more
2

answered 2020-04-16 07:14:36 +0100

slelievre gravatar image

updated 2020-04-16 09:06:20 +0100

In 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

edit flag offensive delete link more
0

answered 2012-09-04 04:00:32 +0100

I have the same problem. If someone know how to do

edit flag offensive delete link more
0

answered 2012-06-14 02:45:22 +0100

asteve gravatar image

updated 2012-06-14 03:04:51 +0100

Mike Hansen gravatar image

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.

edit flag offensive delete link more

Comments

Am... Great, but why post it here?

bk322 gravatar imagebk322 ( 2012-06-14 11:23:20 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-06-08 14:13:32 +0100

Seen: 2,773 times

Last updated: Apr 16 '20