# Physics updates and multi-index summation

December 05 2013

2

Hi,
Relevant developments in Physics happened during the last month and a 1/2, some of them of interest beyond the use of this package. Among the most exciting things I can mention:

1. The redefinition of the derivative rule for the complex components (abs, argument, conjugate, Im, Re, signum) together with the introduction of Wirtinger calculus, as an user-option to work with complex variables. In other words: it is now possible to compute taking z and its conjugate as independent variables and in equal footing.
2. Introduction of textbook mathematical display for all the inert functions of the mathematical language, also for unknown functions f(x).
3. New options in Physics:-Setup to indicate that some mathematical objects are real (different from assume(x, real), while integrated with `is` and `coulditbe`).
4. A rather large number of micro developments advancing the integration of Physics with simplify, expand and combine.
5. Another large number of micro developments for quantum mechanics.
6. New options in Physics:-Setup to redefine sum as Physics:-Library:-Add, and with that have access to multiindex summation directly from sum, for instance as in sum(f(i, j), i + j <= n), including related typesetting copy & paste.

As usual the latest version of the package is available for download in the Maplesoft Physics: Research & Development webpage  and in the zip there is a worksheet illustrating all these developments. Below I'm copying the section related to the new redefinesum option of Physics:-Setup and multiindex summation.

Thanks to everyone who provided feedback, it has been of great value and at the root of this new round of developments.

December 4

 • New option in Setup: redefinesum, so that the sum command is redefined in such a way that     a) the sum arguments are processed in a way avoiding premature evaluation and related unexpected results or error interruptions     b) the sum command includes new functionality present in Physics:-Library:-Add to perform sum over integer values of many indices, as in

or

 >
 (1.1)

New option: redefine sum so that its arguments are processed by the more modern Physics:-Library:-Add and so that it can perform multiindice summation.

Example:

By default, the sum command is not redefined, so the value of redefinesum is

 >
 (1.2)

Consider this multiindex summation functionality of the Physics:-Library:-Add command

 >
 (1.3)

For instance, for n = 2,

 >
 (1.4)

This functionality can be plugged directly into the sum command. For that purpose, set redefinesum to true

 >
 (1.5)

You can now compute directly with sum. The left-hand side is inert while the right-hand side is computed

 >
 (1.6)
 >
 (1.7)
 >
 (1.8)

The formula for the integer power of a sum

 >
 (1.9)
 >
 (1.10)
 >
 (1.11)

Verify whether this equation is true

 >
 (1.12)

Besides this new functionality, the redefined sum does a more modern handling of its arguments, consider a typical problem posted in Maple primes

 >
 (1.13)

In the following summation, j is a dummy summation index, so the value just assigned, , is not expected to interfer with the summation. This is the case with the redefined sum

 >
 (1.14)

while without redefining sum the input above is interrupted with an error message. Likely, in this other case also reported in Mapleprimes

 >
 (1.15)

the following two summations can be performed after having redefining sum:

 >
 (1.16)

For the summation above, without redefining sum, it returns 0 instead of unevaluated, because of a premature evaluation of the function  with an unassigned index i before performing the summation. Returning unevaluated as (1.16) permits evaluate the sum at a latter moment, for instance attributing a value to f

 >
 (1.17)

And this other sum where f is given from the begining also returns 0 without redefining sum

 >
 (1.18)

Problems like this other one reported in Mapleprimes here also get resolved with this redefinition of sum.