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: [mg12971] Re: [mg12882] How to Extract a common factor from a Sum
  • From: BobHanlon at aol.com
  • Date: Sun, 28 Jun 1998 02:51:57 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Frank,

Try this:

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

factorSum = Sum[(const_)*(term_), 
	{iter_, low_:1, hi_}] /; 
     FreeQ[const, iter] :> 
     const*Sum[term, {iter, low, hi}]; 

expr /. factorSum

Sum[a*b*f[k]*x^k, {k, N}] //. factorSum


Bob Hanlon

In a message dated 6/24/98 5:41:11 AM, loewenthal at iap.unibe.ch 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?


  • Prev by Date: HTMLSave
  • Next by Date: Artlandia
  • 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