Have a problem deriving the integral in D'Alemberts formula. From "Linear Partial Differential Equations for Scientists and Engineers",  Tyn Myint U..  
In deriving D'Alemberts formula for the one dimensional wave equation the following equations occur on page 123:
Given the general solution
$$u(x,t) = \phi(x+ct)+\psi(x-ct) \tag{5.3.4}$$
and the initial conditions
$$u(x,0) = f(x) = \phi(x)+\psi(x) \tag{5.3.5}$$
$$u_t(x,0) = g(x) = c\phi '(x)-c\psi '(x). \tag{5.3.6}$$
Then integrating the previous equation gives:
$$\phi(x)-\psi(x) = \frac{1}{c}\int_{x_0}^{x}g(\tau)d\tau + K  \tag{5.3.7}$$
I am having problems deriving the last equation, 5.3.7. In the derivation, the previous equation, 5.3.6, appears to be integrated with respect to two different variables on the left and right sides.  I think maybe separation of variables is being used, but if so I need help in understanding how it is used in this case. I would really appreciate being shown in small (simple) steps how this integral is produced. 
Although I have referenced a particular book, all the D'Alembert formula derivations that I have seen are similar to this particular derivation, and leave me with the same question:
My Question is: How is the integral derived? That is: how is equation 5.3.7 derived from equation 5.3.6?
Except for this I understand the derivation of D'Alemberts Formula.
References for D'Alemberts formula:
http://mathworld.wolfram.com/dAlembertsSolution.html
https://en.wikipedia.org/wiki/D%27Alembert%27s_formula
http://www.jirka.org/diffyqs/htmlver/diffyqsse32.html
http://people.uncw.edu/hermanr/pde1/dAlembert/dAlembert.htm 
References for separation of variables:
Integrating each side of an equation w.r.t. to a different variable?
Integrating with respect to different variables
Can anyone explain the intuitive meaning of 'integrating on both sides of the equation' when solving differential equations?
sepvar.pdf 
Links to other related questions on math.stackexchange:
How to separate variables to integrate on both side
Integrating both sides of an equation with respect to different variables
Why are the limits of the integral $0$ and $s$, and not $-\infty$ and $+\infty$?? 
 A: The second initial conditions is given by
$$g(x)=c\phi'(x)-c\psi'(x)$$
whereupon integrating $g(\tau)=c\phi'(\tau)-c\psi'(\tau)$ from $\tau=x_0$ to $\tau =x$ becomes
$$\begin{align}
\phi(x)-\psi(x)&=\phi(x_0)-\psi(x_0)+\int_{x_0}^x \left(\phi'(\tau)-\psi'(\tau)\right)\,d\tau\\\\
&=\frac1c\int_{x_0}^xg(\tau)\,d\tau+\underbrace{\phi(x_0)-\psi(x_0)}_{K} \tag 1
\end{align}$$
Adding $(1)$ to, and subtracting $(1)$ from the first initial condition, $f(x)=\phi(x)+\psi(x)$ yields 
$$\begin{align}
\phi(x)&=\frac12 f(x)+\frac{1}{2c}\int_{x_0}^xg(\tau)\,d\tau+\frac12(\phi(x_0)-\psi(x_0))\tag 2\\\\
\psi(x)&=\frac12 f(x)-\frac{1}{2c}\int_{x_0}^xg(\tau)\,d\tau-\frac12(\phi(x_0)-\psi(x_0))\tag 3
\end{align}$$
Finally, evaluating $(2)$ at $x= x+ct$ and $(3)$ at $x=x-ct$ and adding the results, we find that 
$$\begin{align}
u(x,t)&=\phi(x+ct)+\psi(x-ct)\\\\
&=\frac12\left(f(x+ct)+f(x-ct)\right)+\frac{1}{2c}\int_{x-ct}^{x+ct}g(\tau)\,d\tau
\end{align}$$
And we are done!
A: The original question was equation 5.3.6 appears to be integrated with respect to two different variables on the left and right sides to get equation 5.3.7.
But this is an illusion.  Although the derivatives in equation 5.3.6 appear the be time derivatives, they are actually spatial derivatives as is shown in the following.  Leibniz notation and the chain rule help clarify things.
Given
$$u(x,t) = \phi(x+ct)+\psi(x-ct) \tag{5.3.4}$$
Differentiating with respect to t, using the chain rule since $\phi$ and $\psi$ have arguments that are functions rather than single variables, yields
$$ \frac{\partial u(x,t)}{\partial t}\; =\; \frac{ \partial \psi(x-ct)}{\partial (x-ct) } \frac{ \partial (x-ct)}{\partial t }\; + \;\frac{ \partial \phi(x+ct)}{\partial (x+ct) } \frac{ \partial (x+ct)}{\partial t }\tag{a}$$
$$= \;  c\left[-\frac{ \partial \psi(x-ct)}{\partial (x-ct) }\;+ \; \frac{ \partial \phi(x+ct)}{\partial (x+ct) }\right] \;\tag{b} $$
Then setting $t=0$:
$$\frac{\partial u(x,0)}{\partial t}\;= \; -c\frac{ \partial \psi(x)}{\partial (x) }\;+ \; c\frac{ \partial \phi(x)}{\partial (x) } \;\tag{c}$$
$$=\; -c\psi'(x)+c\phi'(x)\;\;\;\tag{d}$$
Equation d is the same as equation 5.3.6 but here the primes clearly indicate differentiation with respect to the spatial variable, not the temporal variable.
Defining $g$ :
$$ g(x,t)=\frac{\partial u(x,t)}{\partial t}\; \tag{e}$$
so
$$ \frac{\partial u(x,0)}{\partial t}\; =g(x,0)=g(x)\ \tag{f}$$
we get equation 5.3.6
$$ g(x)=\; -c\psi'(x)+c\phi'(x)\;\;\; \tag{g}$$
Then both sides can be integrated with respect to the spatial variable x to get equation 5.3.7
$$\phi(x)-\psi(x) = \frac{1}{c}\int_{x_0}^{x}g(\tau)d\tau + K \tag{h}$$
So this shows how equation 5.3.7 is derived from equation 5.3.6 which answers the question.
