Solution Check to a Partial Differential Equation I have the following partial differential equation (where $u = u(x,t)$)
$$a(x) \frac{\partial u}{\partial t} + f \frac{\partial u}{\partial x} = 0$$
I was given that the solution for $u$ is any differentiable function $h$ of the argument
$$t - \frac{1}{f}\int_0 ^x a(\alpha) d\alpha$$
i.e
$$u(x,t) = h \left( t - \frac{1}{f}\int_0 ^x a(\alpha) d\alpha \right)$$
To get this solution, I assumed that the solution was on the form $u = h(t + g(x))$ and sought out to find $g(x)$.
I substituted the form of the solution into the partial differential equation which resulted in (this is the step I am unsure with)
\begin{align}
a(x) + f \frac{\partial g}{\partial x} &= 0 \\
\implies \frac{\partial g}{\partial x} &= \frac{-a(x)}{f} \\
\implies g(x) &= \int_0^x\frac{-a(\alpha)}{f} d\alpha
\end{align}
Hence, my solution matches the given solution. 
However, I am unsure if this working out is, in fact, correct. Also, we were given an initial condition $C(x,t) = 0$ at $t=0$. I, however, hade a change of variable to $u$, defining $u$ as 
$$u(x,t) = K\log(\frac{C(x,t)}{K})$$,
where $K$ is just a constant.
Applying the initial condition given for $C(x,t)$ to $u$ yields $u(x,0) = -\infty$. 
I did not use this initial condition when finding my solution, though I have a feeling that it plays a fundamental part in the solution. 
Thanks for the help.
 A: Consider the more general problem of this PDE !
$$a(x) \frac{\partial u}{\partial t} + b(t) \frac{\partial u}{\partial x} = 0$$
Your problem is the particular case of $b(t)=$constant.
$$ \frac{\partial u}{b(t)\partial t} +  \frac{\partial u}{a(x)\partial x} = 0$$
Change of variables :
$\begin{cases}
X=\int a(x)dx \\
T=\int b(t)dt
\end{cases}$
$$ \frac{\partial u}{\partial T} + \frac{\partial u}{\partial X} = 0$$
It is well known and elementary to prove that the general solution is :
$$u(X,T)=F(X-T)$$
where $F$ is an arbitrary function.
Coming back to the original variables :
$$u(x,t)=F\left(\int a(x)dx -\int b(t)dt  \right)$$
In the case of $b(t)=f=$constant :
$$u(x,t)=F\left(\int a(x)dx -f\:t  \right)$$
Since $F$ is an arbitrary function they are an infinity of equivalent forms to express the general solution, for example :
$u(x,t)=G\left(-\frac{1}{f}\int a(x)dx +\:t  \right)\quad$ with $G$ an arbitrary function.
or
$u(x,t)=H\left(c_1\frac{1}{f}\int a(x)dx -c_1\:t  +c_0\right)\quad$ with $H$ an arbitrary function.
Or many other equivalent forms. 
Note that the arbitrary coefficient of $\int a(x)dx$ and $-f\:t$ must be the same : $H\left(c_1\int a(x)dx -c_2f\:t  +c_0\right)$ is not solution of the PDE if $c_1\neq c_2$.
