# General solution to the wave equation in 1+1D

In a book I'm reading it states,

$$y(x,t) = f(x+vt) + g(x-vt)$$ is a solution to the one dimensional wave equation,

But upon differentiating with respect to time and $$x$$ twice I arrive at:

$$\frac{\partial^2y}{\partial t^2} = v^2\frac{\partial^2f}{\partial t^2} + v^2\frac{\partial^2g}{\partial t^2}$$

$$\frac{\partial^2y}{\partial x^2} = \frac{\partial^2f}{\partial x^2} + \frac{\partial^2g}{\partial x^2}$$

How can this solve the wave equation if it has different differentials on each side of the equation?

• You are right, thanks for pointing that out. Commented Oct 27, 2019 at 21:16

Short answer: you're getting tripped up by notation. $$\frac{\partial^2}{\partial t^2} f \neq v^2 \frac{\partial^2 f}{\partial t^2}.$$ It's better to just turn to Newton's notation here: $$\frac{\partial^2 f}{\partial t^2} = v^2 f''(x+vt)$$ or, if you must stick to Leibniz's notation, $$\frac{\partial^2 f}{\partial t^2} = v^2\frac{\partial^2 f}{\partial (x+vt)^2}.$$

Think of it as $$y=f(u)+g(v)$$ where $$u=x+vt$$ and $$v=x-vt$$. Now take the derivatives using the chain rule. You’ll see that the second $$x$$ and $$t$$ derivatives are related by a factor of $$v^2$$.

Indeed this is a general solution to the wave equation. Both f and g can be the solution, their combination is also another solution. We can show that using D'Alembert's solution. You said both sides have different differentials. Now if we take different parameters that both depend on x and t as in the above answer we can find the same derivatives in both sides.

Let's take $$a = x+vt$$ and $$b = x-vt$$. Now a and b are both functions of $$x$$ and $$t$$, $$a = a(x,t), b = b(x,t)$$.

Now $$y(x,t)$$ can be written in terms of functions of $$a$$ and $$b$$.

And define a new function which is $$\widetilde{y}(a,b) = y(x(a,b),t(a,b))$$.

Coming back from $$\widetilde{y}$$ is also possible. $$y(x,t) = \widetilde{y}(a(x,t),b(x,t))$$, just simply put x and t instead of a an b.

Now using above relation let's take a derivative

$$\frac{\partial y}{\partial x} = \frac{\partial\widetilde{y}}{\partial a}\frac{\partial a}{\partial x} + \frac{\partial \widetilde{y}}{\partial b}\frac{\partial b}{\partial x}$$

But we know that $$\frac{\partial a}{\partial x} = \frac{\partial b}{\partial x} = 1$$ Second derivative becomes $$\frac{\partial^2 y}{\partial x^2} = (\frac{\partial }{\partial a} + \frac{\partial }{\partial b})(\frac{\partial }{\partial a} + \frac{\partial }{\partial b})\widetilde{y} \\ = \frac{\partial^2 \widetilde{y}}{\partial a^2} + \frac{\partial^2 \widetilde{y}}{\partial b^2} + 2\frac{\partial^2 \widetilde{y}}{\partial a \partial b}$$ By the same token, $$\frac{\partial^2 y}{\partial t^2} = v^2(\frac{\partial^2 \widetilde{y}}{\partial a^2} + \frac{\partial^2 \widetilde{y}}{\partial b^2} - 2\frac{\partial^2 \widetilde{y}}{\partial a \partial b})$$

If we put these equations into our wave equation (simply subtract one from the other) we get $$\frac{\partial^2 \widetilde{y}}{\partial a \partial b} = 0$$ This equation tells us that derivative of $$\widetilde{y}$$ with respect to a does not depend on b, or vice versa. Therefore, we can write $$\widetilde{y}$$ as $$\widetilde{y}(a,b) = f(a) + g(b)$$ where f and g are some arbitrary functions. Simply put x and t instead of a and b to get y. $${y}(x,t) = f(x+vt) + g(x-vt)$$

So we have just found our general solution. You can also find more about its history 1D Wave Equation.