Given the following PDE: $$\frac{\partial}{\partial t} f(x,y,t) = x \frac{\partial f}{\partial y} - y \frac{\partial f}{\partial x}$$
And initial condition: $$f(x,y,0) = g(x,y) = x^2+y^2$$
How do we determine $f$ for all time? My thinking is as follows: the initial function (paraboloid) is being modified by a certain vector field defined by the RHS of the equation, and it determines the shape of the function for $t > 0$
So suppose we have a vector field $v(x,y) = (-y,x)$ then the vector field $v$ represents the movement of the function through time. And the local flow of any particle starting at $(x, y)$ is $p(t) = (-yt + x, xt+y)$. So in this case $p$ represents a curve in $R^2$ going through time, starting at $(x,y)$ and being moved by the said vector field.
So the solution of the PDE is obtained by composing $g$ with $p$, that is: $$f(x,y,t) = g(p(t)) = (-yt+x)^2 + (xt+y)^2 = (x^2+y^2)(t^2+1)$$
So at first glance it does satisfy the initial condition, but it does not satisfy the main PDE itself.
$$\frac{\partial f}{\partial t} = 2t(x^2+y^2)$$ But $$\frac{\partial f}{\partial x} = 2x(t^2+1)$$ $$\frac{\partial f}{\partial y} = 2y(t^2+1)$$ So the RHS of the equation is zero
What did I do wrong here?
Let us rewrite the PDE in a more classical form: $$a_1(x,y,z)~\partial_xu(x,y,z)+a_2(x,y,z)~\partial_yu(x,y,z)+a_3(x,y,z)\partial_zu(x,y,z)=a_4(x,y,z)$$ With initial condition $$u(\boldsymbol \gamma(r_1,r_2))=\varphi(r_1,r_2)$$ Where $$a_1(x,y,z)=y~,~a_2(x,y,z)=-x~,~a_3(x,y,z)=1~,~a_4(x,y,z)=0$$ And $$\boldsymbol{\gamma}(r_1,r_2)=\big(\gamma_1(r_1,r_2),\gamma_2(r_1,r_2),\gamma_3(r_1,r_2)\big)=(r_1,r_2,0)$$ And $$\varphi(r_1,r_2)={r_1}^2+{r_2}^2$$
The standard approach is characteristics. Though they are usually only presented for two variable PDEs it is not hard to extend them to higher dimensions. Essentially what you need to notice is that we can write this equation as a dot product of two vectors in $\mathbb{R}^4$: $$(a_1,a_2,a_3,a_4)\boldsymbol\cdot(\partial_xu,\partial_yu,\partial_zu,-1)=0$$ We consider our solution $u$ as a three dimensional surface embedded in $\mathbb{R}^4$: $$\mathcal{S}=\{(x,y,z,w)\in\Bbb{R}^4:w=u(x,y,z)\}$$ And, it is simple enough to see that the vector $$\boldsymbol n=\nabla u-\boldsymbol{e}_4$$ Is normal to this surface. Thus, the vector $(a_1,a_2,a_3,a_4)$ must always lie in the tangent plane to $\mathcal S$. So given a curve in $\Bbb{R}^4$ say $$C=\{\big(x(t),y(t),z(t),w(t)\big)~|~t\in\Bbb{R}\}$$ In order for it to be contained in $\mathcal S$ it must satisfy $$ \begin{array}{l} x'( t) =a_{1}( x( t) ,y( t) ,z( t))\\ y'( t) =a_{2}( x( t) ,y( t) ,z( t))\\ z'( t) =a_{3}( x( t) ,y( t) ,z( t))\\ w'( t) =a_{4}( x( t) ,y( t) ,z( t)) \end{array}$$ If we are given an initial condition, we can make a slight generalization of the above equations to incorporate the ICs. In that case we write these as $$ \begin{array}{l} \partial _{s} x( r_{1} ,r_{2} ,s) =a_{1}\big( x ,y ,z\big)( r_{1} ,r_{2} ,s)\\ \partial _{s} y( r_{1} ,r_{2} ,s) =a_{2}\big( x ,y ,z\big)( r_{1} ,r_{2} ,s)\\ \partial _{s} z( r_{1} ,r_{2} ,s) =a_{3}\big( x ,y ,z\big)( r_{1} ,r_{2} ,s)\\ \partial _{s} w( r_{1} ,r_{2} ,s) =a_{4}\big( x ,y ,z\big)( r_{1} ,r_{2} ,s) \end{array}$$ With initial conditions $$ \begin{array}{l} x( r_{1} ,r_{2} ,0) =\gamma _{1}( r_{1} ,r_{2})\\ y( r_{1} ,r_{2} ,0) =\gamma _{2}( r_{1} ,r_{2})\\ z( r_{1} ,r_{2} ,0) =\gamma _{3}( r_{1} ,r_{2})\\ w( r_{1} ,r_{2} ,0) =\varphi ( r_{1} ,r_{2}) \end{array}$$ Essentially what we are doing is finding a parametric representation of our surface $\mathcal S$ involving $r_1,r_2,s$ and then inverting these equations to find a direct representation in terms of $x,y,z$.
Let's try that in our case. Our characteristic equations are $$ \begin{array}{l} \partial _{s} x( r_{1} ,r_{2} ,s) =y( r_{1} ,r_{2} ,s)\\ \partial _{s} y( r_{1} ,r_{2} ,s) =-x( r_{1} ,r_{2} ,s)\\ \partial _{s} z( r_{1} ,r_{2} ,s) =1\\ \partial _{s} w( r_{1} ,r_{2} ,s) =0 \end{array}$$ With initial conditions $$ \begin{array}{l} x( r_{1} ,r_{2} ,0) =r_{1}\\ y( r_{1} ,r_{2} ,0) =r_{2}\\ z( r_{1} ,r_{2} ,0) =0\\ w( r_{1} ,r_{2} ,0) ={r_{1}}^{2} +{r_{2}}^{2} \end{array}$$
These equations are decoupled, thankfully. We can solve this system in general as $$\begin{array}{l} x( r_{1} ,r_{2} ,s) =f_{1}( r_{1} ,r_{2})\cos( s)+f_{2}( r_{1} ,r_{2})\sin( s) \\ y( r_{1} ,r_{2} ,s) =-f_{1}( r_{1} ,r_{2})\sin( s)+f_{2}( r_{1} ,r_{2})\cos( s) \\ z( r_{1} ,r_{2} ,s) =s+f_{3}( r_{1} ,r_{2})\\ w( r_{1} ,r_{2} ,s) =f_{4}( r_{1} ,r_{2}) \end{array}$$ When we apply our initial conditions we find that our arbitrary "constants" (actually functions, that are constant w.r.t $s$) of integration are $$f_1(r_1,r_2)=r_1~,~f_2(r_1,r_2)=r_2~,~f_3(r_1,r_2)=0~,~f_4(r_1,r_2)={r_1}^2+{r_2}^2$$ So we have, $$ \begin{array}{l} x( r_{1} ,r_{2} ,s) =r_{1}\cos( s)+r_{2}\sin( s) \\ y( r_{1} ,r_{2} ,s) =-r_{1}\sin( s)+r_{2}\cos( s) \\ z( r_{1} ,r_{2} ,s) =s\\ w( r_{1} ,r_{2} ,s) ={r_1}^2+{r_2}^2 \end{array}$$ What we want to do now is invert the above equations to find $r_1(x,y,z),r_2(x,y,z),s(x,y,z)$ from which we will use $$u(x,y,z)=w(r_1,r_2,s)(x,y,z)$$ To fully construct our solution. We can see at a glance that $$s(x,y,z)=z$$ And then we can write the first two equations in matrix form: $$\begin{bmatrix} \cos( z) & \sin( z)\\ -\sin( z) & \cos( z) \end{bmatrix}\begin{bmatrix} r_{1}( x,y,z)\\ r_{2}( x,y,z) \end{bmatrix} =\begin{bmatrix} x\\ y \end{bmatrix}$$ Inverting the matrix we find that $$\begin{bmatrix} r_{1}( x,y,z)\\ r_{2}( x,y,z) \end{bmatrix} =\begin{bmatrix} \cos( z) & -\sin( z)\\ \sin( z) & \cos( z) \end{bmatrix}\begin{bmatrix} x\\ y \end{bmatrix}$$ Or, $$ \begin{array}{l} r_{1}( x,y,z) =x\cos( z) -y\sin( z)\\ r_{2}( x,y,z) =x\sin( z) +y\cos( z) \end{array}$$ Therefore, we have finally $$u(x,y,z)=w(x\cos( z) -y\sin( z),x\sin( z) +y\cos( z))=\big(x\cos( z) -y\sin( z)\big)^2+\big(x\sin( z) +y\cos( z)\big)^2$$ $$u(x,y,z)=x^2+y^2$$ We can see that our solution, curiously, does not involve $z$.
I hope this illustrated the method of characteristics well.