Re: How to Extract a common factor from a Sum

*To*: mathgroup at smc.vnet.net*Subject*: [mg12990] Re: [mg12882] How to Extract a common factor from a Sum*From*: "Jrgen Tischer" <jtischer at col2.telecom.com.co>*Date*: Sun, 28 Jun 1998 02:52:12 -0400*Sender*: owner-wri-mathgroup at wolfram.com

Hi Frank, try extractFactor= Sum[expr_Times,{k_,a__}]:> Times@@Cases[expr,_?(FreeQ[#,k]&)]Sum[ Evaluate[DeleteCases[expr,_?(FreeQ[#,k]&)]],{k,a}] Jrgen -----Original Message----- From: Frank Loewenthal <loewenthal at iap.unibe.ch> To: mathgroup at smc.vnet.net Subject: [mg12990] [mg12882] How to Extract a common factor from a Sum >Hi Folks > >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? > >Thanks in advance > >Frank >