(I never had a PDE course unfortunately, but this problem came up from some physical problem.)
Solve for $g(x,t)$, where: $$\frac{\partial{g(x,t)}}{\partial t} + \frac{\partial}{\partial x}\left(g(x,t)\frac{-x}{a}\right)=0$$ with some initial condition $g(x,0) = f(x)$, and constant $a$.
Mathematica tells me its solution should be $g(x,t)=e^{t/a} f(x e^{t/a})$, but I would like to know how to solve it myself too. How to do it? Or can you point me in the right direction?
Edit: you suggested separating variables $g(x,t)=\psi(x)\phi(t)$. This gives the following: $$\frac{\partial\ln{\phi(t)}}{\partial t} = \frac{\partial}{\partial x} \left(\psi(x) \frac{x}{a}\right)$$ How to continue from here then? The final answer does not look immediately separable to me either...