# Using d'Alembert's solution to solve the 1-D wave equation

Solve $$u_{tt}=7u_{xx},-\infty< x <\infty$$ $$u(x,0)=x^2, u_t(x,0)=\cos(3x),-\infty< x <\infty$$

If you use d'Alembert's solution for this problem after doing change of variables and everything to get the solution $u(x,t)=F(x-ct)+G(x+ct)$ do you use the conditions $u(x,0)=x^2, u_t(x,0)=\cos(3x)$ for F and G? Example would the solution be $u(x,t)=(x-\sqrt{7}t)^2+\cos(3(x+\sqrt{7}t))$? If this is not the case where do we use the conditions?

-

d'Alembert's formula should be $\dfrac{f(x+ct)+f(x-ct)}{2}+\dfrac{1}{2c}\int_{x-ct}^{x+ct}g(s)~ds$ , not $f(x-ct)+g(x+ct)$ !
The solution of this question should be $u(x,t)=\dfrac{(x+\sqrt{7}t)^2+(x-\sqrt{7}t)^2}{2}+\dfrac{\sin(3(x+\sqrt{7}t))-\sin(3(x-\sqrt{7}t))}{6\sqrt{7}}$ , not $u(x,t)=(x-\sqrt{7}t)^2+\cos(3(x+\sqrt{7}t))$ .