General solution to homogeneous 1D wave equation I know that the general solution to the homogeneous 1D wave equation is f(x-vt) or f(x+vt). But how is this actually obtained? Was it just an educated guess, and if so how can we be sure it is the general solution?
 A: (Too long for a comment.)
Those are actually not the most general solutions. For instance, since the wave equation is linear, you can add those two solutions and get another solution. In fact, you can add any number of particular solutions together (the result of which is called superposition). 
The most general solution is the one where you add together all possible solutions, which you can see here in Eq. (41). If you follow the derivation there, you should see why (41) is the most general solution; essentiallly, it covers all possible solutions by first determining that all solutions must be of some form (with a given $m$, in the site's notation), and then they obtain the general solution by summing over all $m.$
A: The wave equation is of the form 
\begin{equation}{\tag{1}}
u_{tt} - c^2 u_{xx} = 0
\end{equation}
Note that if we define the differential operator $L$ by 
$$L(u) := u_{tt} - c^2 u_{xx}$$
Then $(1)$ becomes 
$$L(u) = 0$$
If we factor $L$ we have 
\begin{equation}{\tag{2}}
L(u) = \left(\frac{\partial}{\partial t} - c \frac{\partial}{\partial x}\right)\left(\frac{\partial}{\partial t} + c \frac{\partial}{\partial x}\right)u 
\end{equation}
Let $v = u_t + c u_x$, then we have two first-order PDE's
\begin{equation}{\tag{3}}
v_t - c v_x = 0
\end{equation}
and 
\begin{equation}{\tag{4}}
u_t + c u_x = v
\end{equation}
Since $(3)$ is a transport-type equation it has the solution
$$v(x,t) = j(c + ct)$$
where $v(x) = u(x,0)$. So, $(4)$ becomes an inhomogenous transport equation, namely
\begin{equation}{\tag{5}}
u_t + c u_x = j(x+ct)
\end{equation}
The solution to $(5)$ is
$$u(x,t) = h(x - ct) + \int_{0}^{t} j(x + (s-t)c + cs) ds$$
where $u(x,0) = h(x)$. Now if $G' = j$ then we have
\begin{align*}
u(x,t) &= h(x-ct) + \int_{0}^{t}j(x + (2s - t)c)ds\\
&= h(x-ct) + \frac{1}{2c}\left[G(x+(2s-t)c)\Biggr|_{0}^{t}\right]\\
&= h(x-ct) + \frac{1}{2c}\left[G(x+ct) - G(x-ct)\right]\\
&= f(x+ct) + g(x-ct)
\end{align*}
where $g := h - G/2c$ and $f:= G/2c$. Thus the general solution to $(1)$ is 
$$u(x,t) = f(x+ct) + g(x-ct)$$
I hope this answers most of your question :)
