MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to Extract a common factor from a Sum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg12963] Re: How to Extract a common factor from a Sum
  • From: colin at tri.org.au (Colin Rose)
  • Date: Sun, 28 Jun 1998 02:51:52 -0400
  • Organization: Theoretical Research Institute
  • References: <6mq9k4$2pi@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

loewenthal at iap.unibe.ch (Frank Loewenthal) wrote:


> I have a symbolical sum like

        expr = Sum[ a f[k], {k,1,N}] 

> and I want to force Mathematica to write this as

        expr = a Sum[f[k], {k,1,N}]
 
> What ever I tried it did not work.
> Does anyone knows a solution?


How about

  MyRule := Sum[u_. w_,{k_,a_,b_}] :> u Sum[w,{k,a,b}] /;
FreeQ[u,k]==True


Example:

In[]   expr = Sum[a b c f[k], {k, 1, n}];

In[]   expr //. MyRule

Out[]  a b c Sum[f[k], {k, 1, n}]


Hope this helps

Cheerio

Colin


Colin Rose 
tr(I)    -  Theoretical Research Institute
__________________________________________ colin at tri.org.au   
http://www.tri.org.au/



  • Prev by Date: Re: Maximize
  • Next by Date: HTMLSave
  • Previous by thread: Re: How to Extract a common factor from a Sum
  • Next by thread: Re: How to Extract a common factor from a Sum