MATH 373 -- Applied Mathematics (PDE)
Solution for problem V on Midterm Problem Set
> assume(n,integer); assume(a>0); assume(L>a);
> part1:=int(h*x/a*sin(n*Pi*x/L),x=0..a);
> part2:=int(h*(L-x)/(L-a)*sin(n*Pi*x/L),x=a..L);
> simplify((part1+part2)*2/L);
> A := n-> 2*h*L^2*sin(n*Pi*a/L)/(a*(L-a)*(n*Pi)^2);
> PS:=(N,x,t) -> add(A(n)*cos(n*Pi*c*t/L)*sin(n*Pi*x/L),n=1..N);
Warning, `n` in call to `add` is not local
> c:=1;h:=.5;L:=10;a:=2;
This plot shows approximately one full cycle of the vibration of the string:
> plot3d(PS(10,x,t),x=0..L,t=0..20);
The following animation shows what the string is doing:
> with(plots):
> animate(PS(10,x,t),x=0..L,t=0..20);
>