ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 09 Apr 2011 05:04:43 +0200creating a fourier series animationhttps://ask.sagemath.org/question/8062/creating-a-fourier-series-animation/Hello,
I want to create an animation of sum((-1)^(n-1)*sin(n*x)/n,n,1 , k)
and show that as the number of terms 'k' in the partial sums increase, the sum converges to x/2 i.e looks more and more like the graph of x/2.
My first try is
**a = animate([(sum((-1)^(n-1)*sin(n*x)/n,n,1 , k))] for k in range (1,50,1))**
But that returns me an error
*Traceback (click to the left of this block for traceback)
...
AttributeError: 'int' object has no attribute '_maxima_'*
Also I want to include a static graph of x/2 in the background of the animation so that it is easy to observe that the series converges to x/2. how to do this?ebsSat, 09 Apr 2011 05:04:43 +0200https://ask.sagemath.org/question/8062/