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}$
 A: 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.
A: from the ansatz $$y=vx$$ we get by differentiating $$y'=v'x+v$$ and our equation will be $$v'x+v=\frac{x^2(1+v)}{x^2(v-1)}$$ thus we obtain
$$v'x=\frac{1+v}{v-1}$$ with $$v\ne 1$$
A: $$\frac { dy }{ dx } =\frac { { x }^{ 2 }+{ y }^{ 2 } }{ xy-{ x }^{ 2 } } =\frac { 1+\frac { { y }^{ 2 } }{ { x }^{ 2 } }  }{ \frac { y }{ x } -1 } \\ \frac { y }{ x } =t\Rightarrow y=xt\Rightarrow dy=t+xdt\\ t+xdt=\frac { 1+{ t }^{ 2 } }{ t-1 } \\ xdt=\frac { 1+{ t }^{ 2 } }{ t-1 } -t=\frac { 1+{ t }^{ 2 }-{ t }^{ 2 }+t }{ t-1 } =\frac { t+1 }{ t-1 } \\ \int { \frac { t-1 }{ t+1 } dt } =\int { \frac { dx }{ x }  } \\ \int { \left( 1-\frac { 2 }{ t+1 }  \right)  } dt=\int { \frac { dx }{ x }  } \\ t-2\ln { \left| t+1 \right| =\ln { \left| x \right| +C }  } \\ \frac { y }{ x } -2\ln { \left| \frac { y }{ x } +1 \right| =\ln { \left| x \right| +C }  } \\ y\left( 1 \right) =1\\ 1-\ln { 4=C } \\ \frac { y }{ x } -2\ln { \left| \frac { y }{ x } +1 \right| =\ln { \left| x \right| +1- } \ln { 4 }  } \\ \frac { y }{ x } =\ln { \left( { \frac { e }{ 4 } x\left( \frac { x+y }{ x }  \right)  }^{ 2 } \right)  } \\ \\ { \frac { e }{ 4 } x\left( \frac { x+y }{ x }  \right)  }^{ 2 }={ e }^{ \frac { y }{ x }  }\\ { \left( x+y \right)  }^{ 2 }=4{ e }^{ \frac { y }{ x } -1 }\\ \\ $$
