Harj. 12 LV
to 5.12.02
Alustukset
| > | restart: |
Warning, the name changecoords has been redefined
| > | read("/p/edu/mat-1.414/maple/v302.mpl"): #read("c:\\usr\\heikki\\s02\\v302.mpl"); #read("/home/apiola/opetus/peruskurssi/v2-3/maple/v302.mpl"): |
| > | with(plots): |
Normaalimoodit yleisesti
| > | u:=(n,x,t)->cos(c*n*Pi*t/L)*sin(n*Pi*x/L); |
| > | L:=2: c:=3: |
| > | plot3d(u(1,x,t),x=0..L,t=0..5,axes=boxed): |
| > | kuvax:=(n,t)->plot(u(n,x,t),x=0..L): |
| > | kuvax(1,0); |
| > | h:=0.05: N:=30: |
| > | display(seq(kuvax(1,t),t=[seq(j*h,j=0..N)]),insequence=true): |
| > | plot3d(u(3,x,t),x=0..L,t=0..5,axes=boxed,grid=[20,70]): |
| > | h:=0.05: N:=30: |
| > | display(seq(kuvax(3,t),t=[seq(j*h,j=0..N)]),insequence=true); |
| > | display(seq(kuvax(5,t),t=[seq(j*h,j=0..N)]),insequence=false); |
| > |
1 (teht. 3 av)
| > | f:=x->x*(L-x); |
| > | Bn:=2/L*Int(f(x)*sin(n*Pi*x/L),x=0..L); Bn:=value(%); |
| > | Bn:=trigsiev(Bn,n); |
| > | seq(Bn,n=1..10); |
| > | u:=(n,x,t)->cos(c*n*Pi*t/L)*sin(n*Pi*x/L); |
Tässä esiintyy vain parittomia n.
Ominaisfunktioden (normaalimoodien) visualisointia
| > | L:=2: c:=3: |
| > | plot3d(u(1,x,t),x=0..L,t=0..5,axes=boxed); |
| > | kuvax:=(n,t)->plot(u(n,x,t),x=0..L); |
| > | kuvax(1,0); |
| > | h:=0.05: N:=30: |
| > | display(seq(kuvax(1,t),t=[seq(j*h,j=0..N)]),insequence=true); |
| > | T:=3: |
| > |
| > | plot3d(u(3,x,t),x=0..L,t=0..T,axes=boxed,grid=[30,70]); |
| > | T:=3.: N:=100: h:=T/N; |
| > | display(seq(kuvax(3,t),t=[seq(j*h,j=0..N)]),insequence=true); |