Solution (source code)

= Solution

The string is initially at rest, so $y(x,0)=y_t(x,0)=0$. Taking the <Laplace transform> in $t$ converts the <wave equation> into
$$
p^2\widehat y=c^2\frac{\partial^2\widehat y}{\partial x^2}.
$$
For $\operatorname{Re}p>0$, the solution that decays as $x\to\infty$ is $\widehat y=A(p)e^{-px/c}$. The transformed boundary condition $\widehat y(0,p)=\widehat f(p)$ fixes $A=\widehat f$, and therefore
$$
\boxed{\widehat y(x,p)=\widehat f(p)e^{-px/c}}.
$$