Plz suggest



hello dileep,

> I am trying to extract any product which is found after first d(i,j) in
> the following sum.
>
> sum(d(i1,i2)*g(i2)*f(i2,i3)*d(i2,i3),i2,1,n)

my advice at this point is to back up and try something
other than defrule.

it appears that you don't need to handle this problem
in any generality. if so how about something like this?

  summand (e) := if atom(e) then e else if op(e) = verbify(sum) or
op(e) = nounify(sum) then summand (first (args (e))) else e;
  expr: sum(d(i1,i2)*g(i2)*f(i2,i3)*d(i2,i3),i2,1,n);
  summand (expr) / d (i1, i2); => g(i2) d(i2, i3) f(i2, i3)

i.e. grab the summand and divide out the d(i1,i2).

or maybe you are working with products of matrices
and vectors or something.
in that case maybe you can forget the summations
and work directly with multiplication of symbols.
stuff like A' . A = I is a lot more compact than an
equivalent statement in terms of summation.

finally two more bits of unsolicited advice.
about maxima in particular, display2d : false; before
generating stuff to paste into an email helps.
in general, other people might be able to help more
if you give them some clue about what you're trying to
accomplish.

hope this helps & sorry i can't be more helpful,

robert dodier