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
  • Subject: [mg13137] Re: How to Extract a common factor from a Sum
  • From: "Allan Hayes" <hay at>
  • Date: Mon, 13 Jul 1998 07:41:51 -0400
  • References: <6mq9k4$>
  • Sender: owner-wri-mathgroup at

Frank Loewenthal wrote in message <6mq9k4$2pi at>...
>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

Another variant:

factorOut =
Sum[expr_ a_,its__]/;
FreeQ[a, Alternatives@@First/@{its}]:>a Sum[expr, its]


Sum[ a b f[k,l]g[k] z, {k,1,N},{l,1,M}]/.factorOut

a b z Sum[f[k, l] g[k], {k, 1, N}, {l, 1, M}]

------------------------------------------------------------- Allan
Training and Consulting
Leicester UK
hay at
voice: +44 (0)116 271 4198
fax: +44(0)116 271 8642

  • Prev by Date: Re: Starting Sound in Mathematica for Windows
  • Next by Date: Re: Non-commutative algebra
  • Previous by thread: Re: Inconsistencies in pattern matching.
  • Next by thread: Re: ReplacePart question (2)