# Power and Inactive[Sum]

Bug introduced in 10.0 and fixed in 10.4
Inactive is new in 10.0.

What is the reason that the Inactive[Sum] behaves in a strange way with Power?

When I evaluate

Power[Inactive[Sum][a[i], {i, 1, n}], m]


I see

$$\sum_{i=1}^n a[i]^m$$

This is not correct in the formal mathematical sense.

I expected the result

$$\left(\sum_{i=1}^n a[i]\right)^m$$

I am using Mathematica 10.1. How can I work around this problem?

• It is not clear what you are asking. Also, there is no evaluation taking place here, thus there is not result. Please be explicit in your question: 1. this is what I got 2. this is what I think Mathematica should have returned 3. these are my arguments for why 1 is wrong and 2 is right. Mar 20, 2017 at 9:11
• Also, whenever you suspect an incorrect result: state your version of Mathematica. Mar 20, 2017 at 9:12
• I tried in an old version and I see what you mean now. Power[Inactive[Sum][a[i], {i, 1, n}], m] is displayed incorrectly in 10.0-10.3. The display is correct from version 10.4 onwards. The incorrect display does not affect the structure and interpretation of the expression. Next time please state the problem explicitly. Do not assume that everyone sees the same output that you see. Mar 20, 2017 at 9:21
• I do not know how to paste here the output of the Mathematica I write it in tex format, for Power[Inactive[Sum][a[i], {i, 1, n}], m] the answer was \sum_{i=1}^n a[i]^m the correct is (\sum_{i=1}^n a[i])^m. I am using Mathematica version 10.1. According to Szabolcs's answer the problem is the version of my Mathematica Mar 20, 2017 at 10:36
• The problem is what you see, not what Mathematica would do if the sum were evaluated. Mar 20, 2017 at 11:56

This is a bug in Mathematica 10.0-10.3. It is fixed in Mathematica 10.4.

The problem only with the way the expression is displayed. The structure of the expression is not affected: If you wish to use this only for display purposes, a workaround is to use HoldForm instead of Inactive.

HoldForm[Sum[a[i], {i, 1, n}]]^m If you wish to use it for computation, you can ignore the wrong display (although it is not only annoying but increases the chance of mistakes).