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);

[Maple Math]

> part2:=int(h*(L-x)/(L-a)*sin(n*Pi*x/L),x=a..L);

[Maple Math]

> simplify((part1+part2)*2/L);

[Maple Math]

> A := n-> 2*h*L^2*sin(n*Pi*a/L)/(a*(L-a)*(n*Pi)^2);

[Maple Math]

> 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

[Maple Math]

> c:=1;h:=.5;L:=10;a:=2;

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

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);

>