User Tools

Site Tools


en:sumproddefinition

This is an old revision of the document!


Sums and product series

CGRAPH offers the sum() and prod() functions for calculating sums and products. These are defined as follows:

y ~ = ~ sum{n=1}{infty}{f(x, n)}

y ~ = ~ prod{n=1}{infty}{f(x, n)}

The use of the two functions sum() and prod () is subject to the condition that they must always be placed in brackets around the function. Nothing may appear outside of sum() and prod (). The following function terms are therefore permitted:

sum(1/x^n)

prod(x^n)

Terms that include sum() and prod() are therefore not permitted (and are reported as errors):

3*sum(1/x^n)

sin(prod(x^n))

Since CGRAPH cannot calculate infinite sums and products, it has two termination conditions that limit the number of iterations to a maximum of 200 and define a limit beyond which a value no longer contributes significantly to the sum. For sums, this value is close to zero, and for products, it is close to 1. Both values can be specified in the settings.

The variable n then serves as the counting variable. If you use the variable n without sum() and prod(), it always has the value 1. If you want to calculate sums or products with n=0 as the starting value, you must use the term n-1 instead of n.

The variable n does not have to be part of the function – terms that only depend on x, e.g. sum(1/x), are also permitted, as a sum over n values is always formed. However, the variable x is required in all cases – a term that does not depend on x, e.g. sum(1/n), is not permitted.

When using a sum or product function, CGRAPH offers the option of specifying the maximum number of iterations in the default values. This allows you to calculate finite sums and products.

Back to overview

en/sumproddefinition.1772537492.txt.gz · Last modified: by frankbrennecke

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki