PHYS 2063 Wave Physics:
Multiple Masses and Wave Phenomena

Two or three identical masses with springs with matrices

Remove["Global`*"]

Recall the matrix we derived in class, and find the eigenvalues and eigenvectors

Eigensystem[{{2,-1},{-1,2}}]

The first list element are the eigenvalues, that is ω-squared equal to 3ω0-squared or ω0-squared

The second list element are the two lists of eigenvectors corresponding to each of the two eigenvalues. That is, for 3ω0-squared the eigenvector is {-1,1}, which implies that the two masses oscillate against each other (“out of phase”), while for ω0-squared the eigenvector is {1,1}, which implies that the two masses oscillate together (“in phase”).

Again from class, the matrix we derived, and find the eigenvalues and eigenvectors

Eigensystem[{{2,-1,0},{-1,2,-1},{0,-1,2}}]

Follow the example for two masses, above, but now there are three eigenvalues and three sets of eigenvectors.

The general problem of two masses and three springs

Remove["Global`*"]

Define the matrices

kM={{k1+k2,-k2},{-k2, k2+k3}};
mM={{m1,0},{0,m2}};

Find the eigenvalues and eigenvectors

{vals,vecs}=Eigensystem[{kM,mM}];

Check the answers for the special case of both masses equal and outer springs equal

rep={m1->m,m2->m,k1-> k,k2->r k,k3->k};
assmp={k>0,m>0,r>0};
ωSq=Simplify[vals/.rep,Assumptions->assmp]
amps=Simplify[vecs/.rep,Assumptions->assmp]

Two mass with a weak coupling spring

Now two identical masses and three springs, but with the middle spring much weaker than the outside ones. Start with the solution on the previoius slide.

freqs=Simplify[ωSq/.k->ω0^2m,assmp]

Form the general expression for each of the two masses

x1=Simplify[
a amps[[1]][[1]]Exp[I Sqrt[freqs[[1]]]t]+b amps[[1]][[1]]Exp[-I Sqrt[freqs[[1]]]t]-
c amps[[2]][[1]]Exp[I Sqrt[freqs[[2]]]t]+d amps[[2]][[1]]Exp[-I Sqrt[freqs[[2]]]t],
ω0>0]
x2=Simplify[
a amps[[1]][[2]]Exp[I Sqrt[freqs[[1]]]t]+b amps[[1]][[2]]Exp[-I Sqrt[freqs[[1]]]t]-
c amps[[2]][[2]]Exp[I Sqrt[freqs[[2]]]t]+d amps[[2]][[2]]Exp[-I Sqrt[freqs[[2]]]t],
ω0>0]

Start with one mass displaced, and the other at equilibrium and both at rest.

sol=Solve[{(x1/.t->0)==A,(x2/.t->0)==0,(D[x1,t]/.t->0)==0,(D[x2,t]/.t->0)==0},{a,b,c,d}];
x1sol=x1/.sol;
x2sol=x2/.sol;

Plot the result

subs={A->10,ω0->2 Pi,r->0.1};
x1Plot=x1sol/.subs;
x2Plot=x2sol/.subs;
Plot[{x1Plot,x2Plot},{t,0,20}]

Splitting a wave pulse

Remove["Global`*"]

Solve the general wave equation

waveEq=D[y[x,t],{x,2}]-(1/c^2)D[y[x,t],{t,2}]==0;
yGen=Simplify[y[x,t]/.DSolve[waveEq,y[x,t],{x,t}],c>0][[1]]

Use a “double bump” initial shape

bumps[z_]=Exp[-(z+1)^2]+0.5Exp[-(z-1)^2];
Plot[bumps[x],{x,-5,5}]
yBump=yGen/.{C[1][z_]->0.5bumps[-z],C[2][z_]->0.5bumps[z]};

Animate the solution

end=10;
Animate[
Plot[ yBump/.{t->time,c->1},{x,-end,end},
PlotRange->{{-end,end},{0,1}}],
{time,0,5},
AnimationRate->0.75,AnimationRunning->False]

Wave pulse reflecting from a boundary

Remove["Global`*"]

Form the (asymmetrically shaped) wave pulse

q[x_]=HeavisideTheta[x]x Exp[-x/2];

Animage the motion

c=1;
ends=30;
tmax=2 ends/c;
Animate[
Plot[{q[ends+x-c t]-q[ends-x-c t]},
{x,-ends,ends},
PlotRange->{{-ends,ends},{-1,1}}],
{t,0,tmax},AnimationRunning->False]

Standing waves from traveling waves

Remove["Global`*"]

Form the traveling wave trains

trainR=Sin[Pi(x-v t)/2]UnitBox[(x-v t)/width];
trainL=Sin[Pi(x+v t)/2]UnitBox[(x+v t)/width];
trains=trainR+trainL;

Set some parameters

v=1;
end=25;
width=20;
tend=(end-0.6 width)/v;

Create the animation

Animate[
Plot[ trains/.t->time,{x,-end,end},
PlotRange->{{-end,end},{-2,2}}],
{time,-tend,tend},
AnimationRate->0.75,AnimationRunning->False]

The vibrating string with fixed ends

Remove["Global`*"]

Set up the wave form

y=A Cos[n Pi c t/L]Sin[n Pi x/L]

Set some parameters

A=3;L=2;c=1;

Create the animations for different n’s, and also a linear combination

y1=y/.n->1;
Animate[Plot[ y1/.t->time,{x,0,L},
PlotRange->{{0,L},{-A,A}}],
{time,0,6L/(n c)/.n->1},
AnimationRate->1,AnimationRunning->False]

y3=y/.n->3;
Animate[Plot[ y3/.t->time,{x,0,L},
PlotRange->{{0,L},{-A,A}}],
{time,0,6L/(n c)/.n->3},
AnimationRate->1,AnimationRunning->False]

y13=y1+y3;
Animate[Plot[ y13/.t->time,{x,0,L},
PlotRange->{{0,L},{-2A,2A}}],
{time,0,6L/(n c)/.n->3},
AnimationRate->1,AnimationRunning->False]