x^{2} dy + (x^{2} − xy + y^{2}) dx = 0

#### Solution

We have,

\[ x^2 dy + \left( x^2 - xy + y^2 \right)dy = 0\]

\[ \Rightarrow x^2 dy = \left( xy - x^2 - y^2 \right)dy\]

\[ \Rightarrow \frac{dy}{dx} = \frac{xy - x^2 - y^2}{x^2}\]

This is a homogeneous differential equation.

\[\text{Putting }y = vx\text{ and }\frac{dy}{dx} = v + x\frac{dv}{dx},\text{ we get}\]

\[v + x\frac{dv}{dx} = \frac{x^2 v - x^2 - x^2 v^2}{x^2}\]

\[ \Rightarrow v + x\frac{dv}{dx} = v - 1 - v^2 \]

\[ \Rightarrow x\frac{dv}{dx} = - 1 - v^2 \]

\[ \Rightarrow \frac{dv}{1 + v^2} = - \frac{1}{x}dx\]

Integrating both sides, we get

\[\int\frac{dv}{1 + v^2}dv = - \int\frac{1}{x}dx\]

\[ \Rightarrow \tan^{- 1} v = - \log \left| x \right| + \log C\]

\[ \Rightarrow \tan^{- 1} \frac{y}{x} = \log\frac{C}{x}\]

\[ \Rightarrow e^{\tan^{- 1} \frac{y}{x}} = \frac{C}{x}\]

\[ \Rightarrow C = x e^{\tan^{- 1} \frac{y}{x}}\]