[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] Symbolic calculation with symbols
From: |
Stephen Wilson |
Subject: |
Re: [Axiom-mail] Symbolic calculation with symbols |
Date: |
Mon, 6 Sep 2004 22:26:26 -0400 |
User-agent: |
Mutt/1.4.2i |
Hello,
Perhaps you could try expressions such as :
(1) -> reduce(*,[eval(1+j, j=k) for k in [p[i] for i in 1..2]])
(1) (p + 1)p + p + 1
1 2 1
Type: Polynomial Integer
(2) -> reduce(+,[eval(1+j, j=k) for k in [p[i] for i in 1..2]])
(2) p + p + 2
2 1
Type: Polynomial Integer
Sincerely,
Steve
On Mon, Sep 06, 2004 at 10:00:12PM +0200, Hans Peter W??rmli wrote:
>
> I am still struggling with the basics of Axion.
>
> E.g. I am trying to create formulae for products with, say, p sub k as
> symbols. These are the results from two, at least naively identical formulae:
>
> (5) -> (1+p[1])*(1+p[2])
>
> (5) (p + 1)p + p + 1
> 1 2 1
> Type: Polynomial Integer
> (6) -> product(1+p[k],k=1..2)
>
> 2
> (6) p + 2p + 1
> k k
> Type: Expression Integer
>
> How could one use "product" (or "sum" for that reason) and an indexed way to
> denote variables?
>
>
> Cheers, H.P.
>
>
> _______________________________________________
> Axiom-mail mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/axiom-mail