> | restart; |
> | w := Sum((-1)^n*z^n/(n!)^2, n=0..N); |
> | with(plots): |
> |
> | plot(eval(w,N=20), z=0..20):plot(eval(w,N=10), z=0..20, color=black):display(%%,%); |
> | N := 40: |
> | z2 := fsolve(w, z=8); |
> | z1 := fsolve(w, z=2); |
> | L := 1: g := 9.8: |
> | w1 := sqrt(g*z1/L):w2 := sqrt(g*z2/L): |
> | w := unapply(w, z): |
> | w(x/L*zk); |
> | plot([w(x/L*z1), w(x/L*z2)],x=0..L); |
> |
> | animate([cos(w1*t)*w(x/L*z1), x,x=0..L],t=0..3, frames=50); |
> |
> | animate([cos(w2*t)*w(x/L*z2), x,x=0..L],t=0..3, frames=50); |
> | animate([cos(w1*t)*w(x/L*z1)+1*sin(w2*t)*w(x/L*z2),x, x=0..L],t=0..5, frames=100); |
> |
> |