Solve the IVP:
$u_{tt}-c^{2}u_{xx}=0,$
$u(0,x)=e^{x},$
$u_{t}(0,x)=sin(x)$
with D'Alambert formula in the simplest explicit form.
Using the formula I obtained the following solution:
$u(x,t)=1/2[e^{x-ct}+e^{x+ct}]+1/(2c)[-cos(x+ct)+cos(x-ct)]$
Would really appreciate if anyone could confirm that I solved the problem correctly! thank you!!
Applying the d'Alembert's formula: $$u(x,0)=f(x)$$ $$\frac{\partial u}{\partial t}(x,0)=g(x)$$ $$u(x,t)=\frac{1}{2}[f(x+t)+f(x-t)]+\frac{1}{2}\int_{x-t}^{x+t}g(y)dy$$
If you pluck in the initial value, you get:
$$u(x,t)=\frac{1}{2}(e^{x+ct}+e^{x-ct})+\frac{1}{2c}(cos(x-ct)-cos(x+ct))$$