Question: compare two (identical ? ) summation

Hi there,

I am got the two two ( identical ? ) summation .

f:=x->1;

b[n]:=2/Pi*int(f(x)*sin(n*x),x=0..Pi);

S:= N-> sum(b[n]*sin(n*x),n=1..N) ;

T:= N-> 4/Pi*sum(sin((2*n-1)*x)/(2*n-1),n=1..N);

I think S and T should be the same since it's just a substition of 2n-1 difference

however when I plot

 

plot([S(5), S(10), S(20)], x = 0 .. Pi, y = 0 .. 1.5, discont = true, thickness = 3, labeldirections = [horizontal, horizontal], axes = boxed);

 

plot([T(5), T(10), T(20)], x = 0 .. Pi, y = 0 .. 1.5, discont = true, thickness = 3, labeldirections = [horizontal, horizontal], axes = boxed);

 

plot([S(20), S(50), S(500)], x = 0 .. 0.1, y = -0.1 .. 1.5, discont = true,thickness = 3, axes = boxed);

 

plot([T(20), T(50), T(500)], x = 0 .. 0.1, y = -0.1 .. 1.5, discont = true,thickness = 3, axes = boxed);

 

the differences are quite obvious

is it because after the substition, the T summation are effectively computing more terms than the S summation?

 

Thanks

Please Wait...