Thanks Robert,
But it returns all the arguments and I just need the first argument.
Dileep
args (sum (f(i), i, 1, n));
(%o26) [f(i), i, 1, n]
> --__--__--
>
>
> Message: 10
> Date: Fri, 3 Feb 2006 22:11:45 -0700
> From: Robert Dodier <robert.dodier at gmail.com>
> To: "dp2 at cise.ufl.edu" <dp2 at cise.ufl.edu>
> Subject: Re: [Maxima] How to extract polynomial from the
> sum(polynomial,x,1,n) Cc: Maxima at math.utexas.edu
>
>
> hi dileep,
>
>> e.g. sum(f(x,i)*(f(y)*x+f(z)),i,1,n) I want f(x,i)*(f(y)*x+f(z)) from
>> the above expression.
>
> args (expr); => arguments of expression
>
> args (sum (<my summand>, i, 1, n)); => <my summand>
>
> however, maxima notices (f(y)*x+f(z)) doesn't depend on i so it moves that
> outside the summation. so args (sum(f(x,i)*(f(y)*x+f(z)),i,1,n)); doesn't
> yield the summand as you have entered it.
>
> related function op returns the operator, e.g. op (sum (<stuff>)); => sum
>
> op and args work on any kind of expression, e.g. op (a + b + c); => "+",
> args (a + b + c); => [a, b, c]
>
> hth robert dodier
>
>
>
> --__--__--
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
> End of Maxima Digest
>
>
>