Solution for PDE $f f_x = a f_t + b$ Does anyone know the solution to this PDE, with $f = f(x,t)$
$$f f_x = a f_t + b$$
the boundary conditions are: $f(0,t) = 0$, $f(L,t) = \text{const}_1$, $f(x,0) = \text{const}_2$
 A: Let us solve $af_t - ff_x = -b$ over $0\leq x \leq L$, $t>0$ with the prescribed initial and boundary conditions.
In some cases, the solution can be deduced from the method of characteristics.
Here, there are three families of characteristic curves. We have the curves
\begin{aligned}
&x = \frac{b}{2a^2} (t - t_0)^2 &&\text{where}\quad f = -\frac{b}{a}(t-t_0), && t_0>0\\
&x = \frac{b}{2a^2} t^2 - \frac{c_2}{a}t + x_0 &&\text{where}\quad f = -\frac{b}{a}t + c_2, && 0\leq x_0\leq L\\
&x = \frac{b}{2a^2} (t - t_0)^2 - \frac{{c}_1}{a}(t - t_0) + L &&\text{where}\quad f = -\frac{b}{a}(t-t_0) + c_1, && t_0>0
\end{aligned}
under the requirements $a\neq 0$, $b>0$. The solutions deduced from these relations are valid provided that they are unique (i.e. characteristic curves carrying different informations do not intersect). In the present configuration, characteristics with different information almost always intersect somewhere. Therefore, the nature and expression of the solution (shock, rarefaction, etc.) will be highly dependent on the values of the parameters.
A: $ff_x=af_t+b$
$af_t-ff_x=-b$
Hint:
Follow the method in http://en.wikipedia.org/wiki/Method_of_characteristics#Example:
$\dfrac{dt}{ds}=a$ , letting $t(0)=0$ , we have $t=as$
$\dfrac{df}{ds}=-b$ , letting $f(0)=f_0$ , we have $f=f_0-bs=f_0-\dfrac{bt}{a}$
$\dfrac{dx}{ds}=-f=bs-f_0$ , letting $x(0)=g(f_0)$ , we have $x=\dfrac{bs^2}{2}-f_0s+g(f_0)=g\left(f+\dfrac{bt}{a}\right)-\dfrac{ft}{a}-\dfrac{bt^2}{2a^2}$
