Contents

Computation of Finite and Infinite Sums


Examples of Use:

A finite sum is immediately computed:

 sum(i, i, 1, 100);
       5050

An infinite sum is left unevaluated:

 sum(1/x^2, x, 1, inf);
		     inf
		     ====
		     \	   1
		      >	   --
		     /	    2
		     ====  x
		     x = 1

To obtain a value, you have to add the option simpsum=true:

 sum(1/x^2, x, 1, inf), simpsum=true;
		  2
	       %pi
	       ----
		6

It is possible to add unevaluated sums:

(%i2) sum1: sum(1/x^2, x, 1, inf);
				   inf
				   ====
				   \	 1
(%o2) 				    >	 --
				   /	  2
				   ====	 x
				   x = 1
 sum2:sum(1/x^3, x, 1, inf);
				   inf
				   ====
				   \	 1
(%o3) 				    >	 --
				   /	  3
				   ====	 x
				   x = 1
 sum1 + sum2;
			      inf	 inf
			      ====	 ====
			      \	    1	 \     1
(%o4) 			       >    -- +  >    --
			      /	     2	 /      3
			      ====  x	 ====  x
			      x = 1	 x = 1

Symbolic sums are not automatically contracted. To write both terms under a common summation sign, we have to apply the function sumcontract:

 sumcontract(%);
				inf
				====
				\      1    1
(%o5) 				 >    (-- + --)
				/       2    3
				====   x    x
				x = 1
 ev (%, simpsum=true);
					     2
					  %pi
(%o7) 			        zeta(3) + ----
					   6


Contents