Sums and products
Example 1. Calculation of an infinite sum symbolically. After that we solve it numerically and show the double precision result with 16 decimal digits by clicking on the result and pressing the ENTER key.
We could always tray to write the formulae by the standard way by the function Sum[ ] in the form:
Example 2. When possible, Mathematica find the exact formulae:
Example 3. The multiple sums can contain the indices depending from the previous, for instance k=1, ..., n and m=k, ..., n:
Example 4. One can calculate special sums depending on variables and constants:
Example 5. Attempt to calculate the infinite sum symbolically, but since it cannot, the system shows the inital formula instead of the result. After that we solve the truncated sums and receive a result in the form of a standard of decimal fraction by choice. By inreasing the upper bound we can find the approximate value of the sum.
We obtained an absolute error of 2 decimal digits, so the sum is 1.36.
Example 6. Now Example 5 is written in a standard form. In addition the numerical summation algorithm is applied by the function NSum[ ].
Sum[1/ (i^3 +j^3), {i,1,Infinity },{j,1,Infinity }]
Sum[1/ (i^3 +j^3), {i,1,100}, {j,1,100}];
% //N
NSum[1/(i^3 + j^3),{i,1,2000},{j,1,2000}]
Example 7. Here is a case when the index variable increases with a value of 3. The result is given by 16 decimal digits.
Sum[1/i^3,{i, 1,33,3}]
N[%,16]
13387308346588554663968149
--------------------------
13116805863727582016000000
1.020622587973876
Example 8. Calculating a product is easy by analogy. The operators which end with ; do not show output data. This is convenient when it is bulky or of no interest.
Product[1/i^2, {i,1,100}]; N[%]
Product[1/i^2, {i,1,Infinity}]
NProduct[1/i^2, {i,1,Infinity}] (* NProduct uses numerical method of calculation *)
We can also do it with mathematical symbolics, by using te palette:
Created by Mathematica (December 21, 2007)