Question: Sum versus sum, why the difference?

See below, why the difference + what is the distinction between the 2?  Notice that they yield different results with the is command.

restart; P := a[0]+sum(4*(int(cos(2*Pi*(2*k-1)*x/T), x = 0 .. t))/T, k = 1 .. n); Q := a[0]+4*(int(sum(cos(2*Pi*(2*k-1)*x/T), k = 1 .. n), x = 0 .. t))/T; is(expand(P = Q)), is(combine(P = Q)); is(value(eval(P = Q, n = 10)))

false

(1)

restart; P := a[0]+Sum(4*(Int(cos(2*Pi*(2*k-1)*x/T), x = 0 .. t))/T, k = 1 .. m); Q := a[0]+Int(Sum(4*cos(2*Pi*(2*k-1)*x/T)/T, k = 1 .. m), x = 0 .. t); is(expand(P = Q)), is(combine(P = Q)); is(value(eval(P = Q, m = 10)))

true

(2)

sum(4*(int(cos(2*Pi*(2*k-1)*x/T), x = 0 .. t))/T, k = 1 .. n)

((1/2)*I)*(-ln(-(1+exp((2*I)*Pi*t/T))/(exp((2*I)*Pi*t/T)-1))+exp((2*I)*Pi*(1+2*n)*t/T)*LerchPhi(exp((4*I)*Pi*t/T), 1, 1/2+n)+ln((1+exp((2*I)*Pi*t/T))/(exp((2*I)*Pi*t/T)-1))-LerchPhi(exp(-(4*I)*Pi*t/T), 1, 1/2+n)*exp(-(2*I)*Pi*(1+2*n)*t/T))/Pi

(3)

a[0]+Sum(4*(Int(cos(2*Pi*(2*k-1)*x/T), x = 0 .. t))/T, k = 1 .. m)

a[0]+Sum(4*(Int(cos(2*Pi*(2*k-1)*x/T), x = 0 .. t))/T, k = 1 .. m)

(4)

``


 

Download sum_versus_Sum.mw

 

Please Wait...