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$
Let us solve $af_t - ff_x = -b$ over $0\leq x \leq L$, $t&gt;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}
&amp;x = \frac{b}{2a^2} (t - t_0)^2 &amp;&amp;\text{where}\quad f = -\frac{b}{a}(t-t_0), &amp;&amp; t_0&gt;0\\
&amp;x = \frac{b}{2a^2} t^2 - \frac{c_2}{a}t + x_0 &amp;&amp;\text{where}\quad f = -\frac{b}{a}t + c_2, &amp;&amp; 0\leq x_0\leq L\\
&amp;x = \frac{b}{2a^2} (t - t_0)^2 - \frac{{c}_1}{a}(t - t_0) + L &amp;&amp;\text{where}\quad f = -\frac{b}{a}(t-t_0) + c_1, &amp;&amp; t_0&gt;0
\end{aligned}
under the requirements $a\neq 0$, $b&gt;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.
$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}$