itc
itc

Reputation: 175

Summation of non-constants in Maple

Suppose that f := x -> k where k is a constant. Then sum(f(x), i = 1 .. n) is nk. Now suppose that I have a non-constant function of x defined as f := x -> exp(-x). Now I have y defined to be y := product(f(x__i), i = 1 .. n) and the answer I am getting is wrong which is exp(-x__i)^n. So it seems like Maple treats every expression or function under the summation to be constant. The correct answer is supposed to be exp(-sum(x__i, i = 1 .. n)). I am looking for assistance on how to fix this. Below is my MWE:

f := x -> exp(-x);

y := product(f(x__i), i = 1 .. n);   


y := simplify(y);  

and output:
enter image description here

Upvotes: 0

Views: 74

Answers (0)

Related Questions