MathGroup Archive 2011

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

Search the Archive

Re: Solve equation with summation?

  • To: mathgroup at
  • Subject: [mg123048] Re: Solve equation with summation?
  • From: Andrzej Kozlowski <akoz at>
  • Date: Tue, 22 Nov 2011 05:32:11 -0500 (EST)
  • Delivered-to:
  • References: <>

This is exactly as it should be. In Mathemaitcs Sum is not an algebraic 
operator but only a Head of an expression. If the arguments of Sum are 
the kind that Mathematica knows how to evaluate it will do so, if not it 
will leave the expression unevaluated. No algebraic operations on this 
expression will have any effect. It seems that people who expect 
something else to happen imagine that Sum is something like Plus, for 
which you can do things like

Simplify[x (a/x + b/x + c/x)]


This will also work:

Simplify[x Sum[a[i]/x, {i, 1, 3}]]


but only because in such a case Sum is evaluated and the result of the 
evaluation is Plus[...]. Only then algebraic transformations can be 
performed. Nothing of that kind will  happen here

Simplify[x*Sum[a[i]/x, {i, 1, n}]]

x*Sum[a[i]/x, {i, 1, n}]

and there is no reason to expect that it will. If you want to be able to 
do such transformations on Sum you have to write the code for it 
yourself. The reason for this behaviour is almost certainly because 
people at WRI believe that this sort of code for Sum would not be 
seriously useful (beyond what most users can either do by hand or by 
simple programming).

Andrzej Kozlowski 

On 21 Nov 2011, at 10:28, Dana DeLouis wrote:

> Hi.  A simpler example than Solve for this issue might be to just 
> t = Sum[Subscript[a, i]/x, {i, 1, n}]
> If you multiply the above by x, then the x should cancel.
> However, it still remains unevaluated. 
> FullSimplify[x*t]
> x*Sum[Subscript[a, i]/x, {i, 1, n}]
> As a side note, saying that x was not zero didn't help either.
> x * Sum[Subscript[a, i]/x, {i, 1, n}, Assumptions -> x != 0]
> <unevaluated>
> Because if x was zero, then you have  Power::Infy
> Sum[Subscript[a, i]/0, {i, 1, n}]
> Power::infy:Infinite expression 1/0 encountered. >>
> ComplexInfinity
> = = = = = = =
> On Nov 18, 6:22 am, Ivan <ive... at> wrote:
>> For a summation like \sum_{i=1}^n a_i/x = 1,
>>  Solve[Sum[Subscript[a, i], {i, 1, n}]/x == 1, x]
>> gives a correct solution.
>> However, by putting x into the summation:
>>  Solve[Sum[Subscript[a, i]/x, {i, 1, n}] == 1, x]
>> gives an empty set, why?

  • Prev by Date: Re: How to do quickest
  • Next by Date: Re: How to do quickest
  • Previous by thread: Re: Solve equation with summation?
  • Next by thread: EmpiricalDistribution bug