Solution (source code)

= Solution

Write the initial <triangular pulse> as the function $h$, extended by zero to negative arguments:
$$
h(s)=\begin{cases}as/L,&0\leq s\leq L,\\a(2L-s)/L,&L\leq s\leq2L,\\0,&\text{otherwise}.\end{cases}
$$
At $t=0$, the initial <displacement> and zero <velocity> give $f+g=h$ and $-cf'+cg'=0$ on the positive half-line. Fix the harmless opposite additive constants by taking both <travelling waves> to vanish at positive infinity. Then
$$
\boxed{f(s)=g(s)=\tfrac12h(s)\quad(s>0),\qquad f(s)=-\tfrac12h(-s)\quad(s<0).}
$$
The second formula follows from the fixed-end <boundary condition> $f(-ct)+g(ct)=0$. Thus $f$ is one-half of the <odd extension> $H$ of the initial <displacement>, and
$$
y(x,t)=\tfrac12[H(x-ct)+H(x+ct)],\qquad x\geq0.
$$
This is the <odd-extension solution for a semi-infinite fixed string>: the reflected <displacement> reverses sign. Evaluating the travelling profiles gives
$$
\boxed{y(x,L/c)=\tfrac12h(x-L),\qquad
y(x,2L/c)=\tfrac12[h(x-2L)-h(x)].}
$$
The first profile is a positive triangle supported on $[L,3L]$, with peak $a/2$ at $2L$. The second has a negative triangle on $[0,2L]$ with minimum $-a/2$ at $L$, and a positive triangle on $[2L,4L]$ with maximum $a/2$ at $3L$.

\Image[/past-exam-of-the-mathematical-methods-ii-course-of-the-university-of-oxford/2018-fixed-string-reflection.png]
{title=The two requested <displacement> profiles after <fixed-end reflection of a triangular pulse>, with lengths scaled by $L$ and heights by $a$}