# Solving an initial value problem of the wave equation

Solve the initial value problem: $$\begin{cases} v_{tt} = c^2v_{xx} \ \ &\text{for} \ \ x > 0, t > 0,\\ v(x,0) = \cos(x) \ \ &\text{for} \ \ x > 0,\\ v_t(x,0) = e^{-x} \ \ &\text{for} \ \ x > 0\\ v_x(0,t) = 0 \ \ &\text{for} \ \ t > 0 \end{cases}$$

Attempted solution - By d'Alembert the solution is \begin{align*} u(x,t) &= \begin{cases} \frac{1}{2}\left[ \cos(x + ct) + \cos(x-ct) \right] + \frac{1}{2c}\int_{x-ct}^{x+ct}e^{-s}ds; \ \ x \geq ct\\ \frac{1}{2}\left[ \cos(x + ct) + \cos(ct - x) \right] + \frac{1}{2c}\int_{ct - x}^{x + ct}e^{-s}ds; \ \ x \leq ct\\ \end{cases}\\ &= \begin{cases} \frac{1}{2}\times 2 \cos(x)\cos(ct) + \frac{1}{2c}\left[-e^{-(x+ct)} + e^{-(x - ct)} \right] \ \ x \geq ct\\ \frac{1}{2}\times 2 \cos(ct)\cos(x) + \frac{1}{2c}\left[-e^{-(x+ct)} + e^{-(ct - x)} \right] \ \ x \leq ct\\ \end{cases}\\ &= \begin{cases} \cos(x)\cos(ct) + \frac{1}{2c}e^{-x} \left[e^{ct} - e^{-ct} \right] \ \ x \geq ct\\ \cos(x)\cos(ct) + \frac{1}{2c}e^{-ct} \left[e^{x} - e^{-x} \right] \ \ x \leq ct\\ \end{cases} \end{align*} Therefore, $$u(x,t) = \begin{cases} \cos(x)\cos(ct) + \frac{1}{c}e^{-x}\sinh(ct) \ \ x \geq ct\\ \cos(x)\cos(ct) + \frac{1}{c}e^{-ct}\sinh(x) \ \ x \leq ct\\ \end{cases}$$

I just want to see if my approach is correct or not, any suggestions are greatly appreciated.

• One method to check the results is to see if the solution satisfies the pde. In this case it does. It is a matter of checking to see if the solution then satisfies all the boundary conditions. Here $v_{x}(0,t) = 0$ may give some clues to the solution being correct. Commented Jun 5, 2017 at 19:45