利用傅里叶变换可以得到: 2 2 U tt a ik U U k , t Ak cosakt Bk sin akt U k , t 0 k ; U t k , t 0 k ; 再用初始条件得: U k , t k cosakt k sin akt / ak 通过反变换可得 1 1 x at u x, t x at x at x at d 2 2a 达朗贝尔公式:
x at 0 0; 1 x at d x at / 2a; 0 x at 1 2a 1 / 2a; x at 1
%ex602; (p159) 无限长弦波动的解析解(初位移为0, 初速不为0) clear; M=100; N=80; a=1.0; L=10; T1=8; dx=L/M; dt=T1/N; x=-L:dx:L; t=0:dt:T1;[X,T]=meshgrid(x,t); xp=X+a*T; xp(find(xp<=0))=0; xp(find(xp>=1))=1; xm=X-a*T; xm(find(xm<=0))=0; xm(find(xm>=1))=1; S=(xp-xm)/(2*a); figure(1); h=plot(x,S(1,:),'linewidth',3); axis([-L L 0 .6]); set(h,'erasemode','xor'); for k=2:N+1; pause(0.01); set(h,'ydata',S(k,:)); drawnow; end;
2l Bn 2 2 cos3nπ / 7 cos4nπ / 7 nπa An 0;