Proving that differentiable functions are n-homogeneous if they satisfy this PDE I'm trying to prove that a differentiable function $f:\mathbb R^2\rightarrow\mathbb R$ is $n$-homogeneous (i.e. satisfies $f(tx,ty)=t^nf(x,y)$ for all $t\in\mathbb R$ and $(x,y)\in\mathbb R^2$) if (I had no problems with the "only if" portion) it satisfies the differential equation
$$x\frac{\partial f}{\partial x}+y\frac{\partial f}{\partial y}=nf$$
at each $(x,y)\in\mathbb R^2$.
I can manage to show that $\vert f(tx,ty)\vert=\vert t^nf(x,y)\vert$, but I can't quite figure how to show the statement without absolute value.
Here's how I got there.
Fix $(x_0,y_0)\in\mathbb R^2$ and note that, if $f$ satisfies the differential equation for all $(x,y)$, it also satisfies
$$tx_0\frac{\partial f}{\partial x}(tx_0,ty_0)+ty_0\frac{\partial f}{\partial y}(tx_0,ty_0)=nf(tx_0,ty_0)$$
for all $t\in\mathbb R$. Let $g(t)=f(tx_0,ty_0)$. Then $tg'(t)=ng(t)$. Provided $g(t)$ is nonzero, we have
$$
\begin{align}
\frac{g'(t)}{g(t)}&=\frac{n}{t}\\
\frac{d}{dt}\ln\vert g(t)\vert&=\frac{d}{dt}\ln\vert t^n\vert\\
\ln\vert g(t)\vert&=\ln\vert t^n\vert+c\\
\vert g(t)\vert&=e^c\vert t^n\vert
\end{align}
$$
for some $c\in\mathbb R$. Provided $g(1)\neq0$, we then have $e^c=\vert g(1)\vert=\vert f(x_0,y_0)\vert$, and thus $\vert f(tx_0,ty_0)\vert=\vert t^nf(x_0,y_0)\vert$ for values of $t$ for which $f(tx_0,ty_0)\neq0$.
I figure at this point, I need to show that $f(tx_0,ty_0)$ and $t^nf(x_0,y_0)$ always have the same sign and handle the values where $g(t)=0$ (especially if $g(1)=0$), but I'm a little stuck. I considered breaking it into cases, but the amount of cases seemed to be a bit excessive, and I considered looking at their product, but I can't think of a way to arrange it so that it's obviously positive.
Edit: I have managed to show the equivalence for positive values of $t$, and, having looked at several treatments of the converse of Euler's homogeneous function theorem, I am now not entirely convinced that this necessarily is true for negative values of $t$. It also would not be the first time an exercise from this analysis text (Taylor's Foundations of Analysis) has been mis-written. So, I will gladly accept that as an answer, if it's the case. Otherwise, I'm still lost on the negatives.
 A: It may happen that a function satisfying the PDE above is not
 $n$-homogeneous.
The simplest case is the one-dimensional one. Define $f\colon \mathbb{R}\to\mathbb{R}$ by $f(x):=x^3$ for $x\geq 0$ and by $f(x):=0$ for $x\leq 0$.
Then $f$ is differentiable and $x f'(x)=3 f(x)$ for all $x$. But $f((-1) x)=0\not=-x^3=(-1)^3 f(x)$ if $x>0$.
A: Suppose $f$ is a solution to 
\begin{align}
x\frac{\partial f}{\partial x}+y\frac{\partial f}{\partial y} = nf(x, y).
\end{align}
Then using the method of characteristic, we see that
\begin{align}
\frac{d}{ds}f(x(s), y(s)) = \dot x\frac{\partial f}{\partial x}+ \dot y\frac{\partial f}{\partial y} = nf(x(s), y(s))
\end{align}
if $\dot x = x$ and $\dot y = y$. 
In particular, it follows that
\begin{align}
x= x_0e^s, \ \ \  y = y_0e^s \ \ \ \text{ and } \ \ \ f(x, y) = f(x_0, y_0)e^{ns}
\end{align}
which means
\begin{align}
f(x, y) = f(xe^{-s}, ye^{-s})e^{ns}  \ \ \implies f(xe^{-s}, ye^{-s}) = e^{-ns}f(x, y)
\end{align}
for any $s$. 
Finally, set $t = e^{-s}$, then we see that
\begin{align}
f(tx, ty) = t^n f(x, y). 
\end{align}
