Wave Reflection and Transmission on a String with a Mass in the Middle

Manipulate[
Show[Plot[Cos[t-x],{x,-2 π,0},PlotRange-> {{-2Pi,2Pi},{-2,2}},PlotStyle->{Black,Dashed},Ticks->None], Plot[-(((a^2) Cos[t+x])/((a^2)+4))-((2 a Sin[t+x])/((a^2)+4)),{x,-2 π,0},PlotRange-> {{-2Pi,2Pi},{-2,2}},PlotStyle->{Blue,Dashed}],Plot[((4 Cos[t-x])/((a^2)+4))-((2 a Sin[t-x])/((a^2)+4)),{x,0,2 π},PlotRange-> {{-2Pi,2Pi},{-2,2}},PlotStyle->{Red,Dashed}],Plot[(((4 Cos[t-x])/((a^2)+4))-((2 a Sin[t-x])/((a^2)+4)))*b,{x,0,2 π},PlotRange-> {{-2Pi,2Pi},{-2,2}},PlotStyle->{Black}],
Plot[(Cos[t-x]-(((a^2) Cos[t+x])/((a^2)+4))-((2 a Sin[t+x])/((a^2)+4)))*b,{x,-2 π,0},PlotRange-> {{-2Pi,2Pi},{-2,2}},PlotStyle->{Black}],Graphics[{PointSize[Sqrt[a]/100],Point[{0,((4 Cos[t])/((a^2)+4))-((2 a Sin[t])/((a^2)+4))}]}],ImageSize->{500,300}],
{{a,10,"mass at origin"},{0->"none",1->"small",10->"medium",100->"large"}},
{{t,2.5,"time"},0,2Pi},
{{b,1,"resultant"},{0->"off",1->"on"}}]

A string of uniform density is stretched along the x axis and undergoes small transverse oscillations in the (x,y) plane. We suppose that a wave is incident from x=-∞ and that a mass is fixed to the string at x=0. The incident wave is shown dashed and black, the reflected wave is dashed and blue, the transmitted wave is dashed and red, and the resultant wave is solid and black.

We suppose that the string is stretched along the x axis under tension T and that a mass M is fixed to the string at x=0. Using force balance, one can show that the equation of motion can be written M(Subscript[((((∂^2)y)/(∂(t^2)))), x=0])= T ((Subscript[(((∂y)/(∂x))), x=(SubPlus[0])])-(Subscript[(((∂y)/(∂x))), x=(SubMinus[0])])). We then suppose that we have a sinusoidal wave coming from x=-∞. This is based on a question from the University of Cambridge "Methods Example Sheet 2" (2009) by Dr. C. Caulfield.

Contributed by: Will Rayward-Smith