Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Approximate Sums Numerically

If the sum command cannot compute a sum, MuPAD® returns an unresolved sum. For example, try to compute the following sum:

sum(exp(x)^(-x), x = 0..infinity)

The reasons MuPAD cannot compute the closed form of a particular sum are the same as the reasons for not computing an integral:

  • The antidifference does not exist in a closed form.

  • The antidifference exists, but MuPAD cannot find it.

  • MuPAD can find the antidifference on a larger computer, but runs out of time or memory on the available machine.

If MuPAD cannot compute a definite sum, try to approximate it numerically:

S := sum(exp(x)^(-x), x = 0..infinity);
float(S)

If you know in advance that the antidifference cannot be computed in a closed form, skip trying to calculate this sum symbolically. For such expressions, call the numeric::sum function to perform numeric summation directly. Trying to calculate a symbolic sum, and then approximating it numerically can be much slower than applying numeric summation from the beginning:

numeric::sum(exp(x)^(-x), x = 0..infinity)

Was this topic helpful?