| > | # CESARO SUMMATION OF A TRIANGLE WAVE |
| > |
| > | aodd := k -> 1/(2*k + 1)^2; |
| > | partialsum := K -> (Pi/2) - (4/Pi)*sum(aodd(k)*cos((2*k+1)*x), k=0..K); |
| > | mean := M -> (1/(M+1))*sum(partialsum(K), K=0..M); |
| > | plot([partialsum(1), mean(1)], x=-1..7); |
| > | plot([partialsum(5), mean(5)], x=-1..7); |
| > | plot([partialsum(20), mean(20)], x=-1..7); |
| > | # Close inspection shows that the Cesaro mean curve is BLUNTER than the partial sum curve. |
| > | # When the partial sums are already well convergent, Cesaro summation just slows down the convergence. |
| > | # This is shown clearly by examining the error in the approximations: |
| > |
| > | plot([abs(x) - partialsum(5), abs(x) - mean(5)], x=0..1); |
| > | plot([abs(x) - partialsum(10), abs(x) - mean(10)], x=0..1); |
| > |