Linear PDE in n+1 dimension given t=0 condition 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?
 A: The standard method of solving such problems is the method of characteristics. You let $p(t)= (x(t), y(t))$ be a path in space that starts at some arbitrary point $(x_0, y_0)$, and cook up $p$ such that $g(t)= f(t, p(t))$ is constant. This will reduce the PDE into a system of ODEs, which we know how to solve. Specifically,
$$
\frac{\text{d}g}{\text{d}t}= \frac{\partial f}{\partial t}+ \frac{\partial f}{\partial x}\frac{\text{d}x}{\text{d}t}+ \frac{\partial f}{\partial y}\frac{\text{d}y}{\text{d}t},
$$
so if we want $\frac{\text{d}g}{\text{d}t}=0$, we want
$$
\frac{\text{d}x}{\text{d}t}= y, \\
\frac{\text{d}y}{\text{d}t}= -x,
$$
so that $x(0)=x_0, y(0)=y_0$. The standard solution to this is given by
$$
x(t)= x_0\cos t+ y_0\sin t, \\
y(t)= -x_0\sin t+ y_0\cos t.
$$
As a result,
$$\tag{$\ast$}
f(t, x_0\cos t+ y_0\sin t, -x_0\sin t+ y_0\cos t)= g(t)= g(0)= f(0, x_0, y_0)= x_0^2+y_0^2,
$$
for all $t$. Solving with respect to $x,y$ we have
$$
x_0= x\cos t- y\sin t, \\
y_0= x\sin t+ y\cos t.
$$
Plugging this back to $(\ast)$ we get
$$
f(t,x,y)= x^2+y^2, 
$$
which does not depend on $t$ at all. You may, however, check that it satisfies the given PDE.
