Substitution to solve an initial value problem By using the substitution $y(x) = v(x)x$, how can I solve the initial value problem
$$
\frac{dy}{dx} = \frac{x^2+y^2}{xy - x^2},\quad y(1)=1
$$
And also keep my answer in the form $g(x,y)= 4e^{-1} xe^\frac{y}{x}$

Here's an attempt:
$$ y = vx \implies \ \frac{dy}{dx} = v + x \frac{dv}{dx}$$
$$ \frac{dy}{dx} = \frac{x^2 + y^2}{xy -x^2}  $$
$$ v + x\frac{dv}{dx} = \frac{x^2 + v^2x^2}{x^2v - x^2}$$
$$ x\frac{dv}{dx} = \frac{v+1}{v-1}$$
Using separation of variables,
$$ \frac{v-1}{v+1}dv  = \frac{v+1-2}{v+1} = \frac{1}{x}dx$$
$$ \left(1-\frac{2}{v+1}\right)dv = \frac{1}{x}dx $$
$$ v-2\ln |1+v| = \ln |x| +c  $$ where c is a constant of integration
using the initial values $y(1) = 1$ gives $v =1 $:
$$ c = 1 -\ln 4 $$
$$ v - 2\ln |1+v| = \ln |x| +1 -\ln 4$$
substituting back $v(x) = \frac{y(x)}{x}$ gives:
$$ \frac{y}{x} = \ln \left(\frac{(x+y)^2}{4x}\right) + \ln e$$
where $1 = \ln e$
$$ \frac{e(x+y)^2}{4x} = e^\frac{y}{x} $$
$$ 4e^{-1} xe^\frac{y}{x} = (x+y)^2 $$
where $g(x, y) = (x+y)^2$
as required.
