Question: how to distribute a sum

I have an expression like this (from an earlier computation):

2*(sum(A*cos(omega*t)^2+cos(omega*t)*B*sin(omega*t)-cos(omega*t)*ymeas(t), t));

I want to distribute the sum over the terms in the expression, i.e.

sum(A*cos(omega*t)^2,t)+sum(cos(omega*t)*B*sin(omega*t,t)+sum(cos(omega*t)*ymeas(t), t)));

I suspect defining a rule and using applyrule should be the way to go, but for the heck of it I can't figure how to do it. The best I can manage is getting the Maple kernel hung with the following construct:


applyrule(distSum,(5)); # (5) referrs to the expression on line 2 (and it is a proper label in my Maple wrkbook).

I have asked similar questions before and gotten answers; but I am not able to find what I need in MapePrimes (or my faorites, for that matter).

Thanks for any help,

Mac Dude


Please Wait...