On Jun 16, 7:34 pm, Jaasiel Ornelas <[email protected]> wrote:
> Hi!
>
> I'm trying to animate a fourier series in terms of time. I use the
> animate command, but it won't take a free variable (in my case x).
> Here is my code:
>
> q(n,x,t,v,L) = (4/pi)* cos((2*n+1)*pi/8)*sin((2*n+1)*pi*x/L)*cos((2*n
> +1)*v*t/L)/(2*n+1)
>
> Qxt(x,t)=q(0,x,t,1,1)+q(1,x,t,1,1)+q(2,x,t,1,1)+q(3,x,t,1,1)+q(4,x,t,
> 1,1)+q(5,x,t,1,1)+q(6,x,t,1,1)+q(7,x,t,1,1)+q(8,x,t,1,1)+q(9,x,t,

[snip]

Marshall's idea seems to work for me, but I'm not sure if it's what
you're looking for.  Anyway, I wanted to point out that you could
write the definition of Qxt more compactly (and also more easily
modifiable):

Qxt(x,t) = sum([q(k,x,t,1,1) for k in range(70)])

--
John

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to