First order PDE from continuity equation

fluid dynamicsmathematical physicspartial differential equations

Given the following equation
$$\frac{\partial \rho}{\partial t}=-\vec{\nabla}\cdot \left(\rho\vec{v}\right)$$
with $\vec{v}(\vec{r})=x\hat{e}_1-y\hat{e}_2$ we get
$$\frac{\partial \rho}{\partial t}=-\vec{v}\cdot \vec{\nabla}\rho=-\left[x\frac{\partial}{\partial x}-y\frac{\partial}{\partial y}\right]\rho\left(t,\vec{r}\right)$$
how can I solve it if the only initial condition given by the question was $\rho(0,\vec{r})=x^2+y^2$. Tried variable separation with no success. I I know this is a basic equation but it's about 2 years since I studied mathematical methods of physcis (more than 2 years actually) lol.
Thank you guys

Best Answer

This is basically a variable coefficient transport equation. The method of characteristics is well-suited for such equations.

Altering the notation a bit, you have $$\partial_tu + (x\partial_x - y\partial_y)u = 0.$$ The idea is to transform the above PDE into an ODE along suitable curves. Taking $u=u(x(s),y(s),t(s))$, we see that we must have $$\frac{dx}{ds} = x(s), \ \frac{dy}{ds}=-y(s), \ \frac{dt}{ds}=1, \ \frac{du}{ds}=0.$$ Assuming $t(0)=0$, we get $t=s$. Further, letting $x(0)=x_0$ and $y(0)=y_0$, we get $$x=x_0e^{s} = x_0e^{t} \text{ and } y=y_0e^{-s} = y_0e^{-t}.$$ By letting $u(0) = \varphi(x_0,y_0)$, we get $u(x,y,t) = \varphi(xe^{-t},ye^{t},t)$. However, we are given $u(x,y,0) = x^2 + y^2$. This implies that $$u(x,y,t) = x^2e^{-2t}+y^2e^{2t}.$$