A string of length one is held tightly at either end, making a straight line from $x=0$ to $x=1$. At time $t=0$, we slap the string imparting an initial velocity of $v(x)=-\sin (x)$ at each point $x$ along the string. Write down a PDE description of the subsequent motion of the string, assuming that the density and tightness yield a string constant of $c=1$.
Setting up a string problem
Looking at our Mathematica file on the wave equation I believe I have the set up for this problem. Given that here $c=1$, our first equation is $u_{tt}=u_{xx}$. The initial velocity is the $u_t(x,0)$, thus $u_t(x,0)=-sin(x)$. Given that the string starts out with an initial configuration of a straight line on the $x$ axis, $u(x,0)=0$ Therefore, the overall set up is $$u_{tt}=u_{xx},u(x,0)=0, u_t(x,0)=-sin(x)$$ The approach I took to solving this problem was to use d'Alembert's formula: $$u(x,t)=\frac{1}{2}(f(x+ct)+f(x-ct))+\frac{1}{2c}\int_{x-ct}^{x+ct}g(s)ds$$ Given that $u(x,0)=0$, we can ignore the first part of the equation, as with example 1 under "Applying d'Alembert's Formula." Thus we have $$-\frac{1}{2}\int_{x-t}^{x+t}sin(s) ds$$ Which, through integration, becomes $-\frac{1}{2}(cos(x-t)-cos(x+t))$. Graphing the solution in Mathematica I saw that this solution oscillates as expected, starting out as a straight line and the propagating the initial velocity throughout the string. However, I am not sure how to upload Mathematica code to Discourse. Can anyone help me out, and/or check my answer?
I feel that you've gone above and beyond. Can you reread the question and edit your response so that you are answering exactly what was asked?
@Mark, for future reference, by give a PDE description, do you mean just this part?
$$u_{tt}=u_{xx},u(x,0)=0, u_t(x,0)=-sin(x)$$