# Help: Product Function

PRODUCT(N,A,B,X) produces the sum of the expression X for values of the dummy variable N in the range from A to B. The initial value is A, and is increased by 1 each time, stopping when it exceeds B. Thus PRODUCT(N,1,3,N^2) produces 1^2 * 2^2 * 3^2 = 36, and so does PRODUCT(N,1,3.5,N^2). PRODUCT(N,3,1,N^2) produces 1, since the initial value is already greater than the final value (and an empty product is considered to be 1).

The dummy variable can be any single letter "A" to "Z". If it already represents a variable or parameter, its current value is restored after the PRODUCT is complete. If more than one dummy variable is active at the same time, they should have different letters - e.g. PRODUCT(I,SUM(J,... is fine but PRODUCT(I,SUM(I,... is wrong.

The initial and final values may be expressions, but should not contain the dummy variable. The expression "X" will usually contain the dummy variable. Any other variables that occur in "X" will keep the same values throughout the sum - even if they depend on the dummy variable, they will NOT be re-evaluated for each new value of the dummy variable.