Concept:
• A differential equation \( M(x,y)dx + N(x,y)dy = 0 \) is homogeneous if both functions are of the same degree.
• For homogeneous equations, use the substitution \( y = vx \), which implies \( \frac{dy}{dx} = v + x\frac{dv}{dx} \).
Step 1: Rearrange and verify homogeneity
\[ \frac{dy}{dx} = \frac{y^2 + 2xy}{2x^2} = \frac{y^2}{2x^2} + \frac{2xy}{2x^2} = \frac{1}{2} \left( \frac{y}{x} \right)^2 + \frac{y}{x} \]
Since the RHS is a function of \(y/x\), the equation is homogeneous.
Step 2: Substitute and separate variables
Let \(y = vx\). Then \( \frac{dy}{dx} = v + x\frac{dv}{dx} \).
Substitute into the equation:
\[ v + x\frac{dv}{dx} = \frac{1}{2}v^2 + v \]
Subtract \(v\) from both sides:
\[ x\frac{dv}{dx} = \frac{v^2}{2} \]
Separate variables:
\[ \frac{2}{v^2} \, dv = \frac{dx}{x} \]
Step 3: Integrate both sides
\[ 2 \int v^{-2} \, dv = \int \frac{1}{x} \, dx \]
\[ 2 \left( \frac{v^{-1}}{-1} \right) = \log|x| + C \]
\[ -\frac{2}{v} = \log|x| + C \]
Step 4: Substitute back for \(y\)
Since \(v = y/x\), then \(1/v = x/y\).
\[ -\frac{2x}{y} = \log|x| + C \]
Or, expressed for \(y\):
\[ y = \frac{-2x}{\log|x| + C} \]