Question:medium

Find the general solution of the following differential equation:

\(x^{2}\dfrac{dy}{dx} = x^{2} + xy + y^{2}\)

Show Hint

The equation is homogeneous. Put y = vx, separate the variables and integrate to get an inverse tangent.
Updated On: Oct 22, 2026
Show Solution

Solution and Explanation

Step 1: Spot the type:
Dividing by $x^2$ gives $\frac{dy}{dx} = 1 + \frac{y}{x} + \frac{y^2}{x^2}$.
Every term on the right is a function of $\frac{y}{x}$. So the equation is homogeneous of degree zero.

Step 2: Use a trigonometric substitution:
The term $1 + t^2$ will appear, so let $y = x\tan\theta$ where $\theta$ depends on $x$.
Differentiate with the product rule.
\[ \frac{dy}{dx} = \tan\theta + x\sec^2\theta\,\frac{d\theta}{dx} \]

Step 3: Put it in the equation:
The right side becomes $1 + \tan\theta + \tan^2\theta = \sec^2\theta + \tan\theta$.
Equate the two forms of $\frac{dy}{dx}$.
\[ \tan\theta + x\sec^2\theta\,\frac{d\theta}{dx} = \sec^2\theta + \tan\theta \]
Cancel $\tan\theta$ on both sides. This leaves $x\sec^2\theta\,\frac{d\theta}{dx} = \sec^2\theta$.
Since $\sec^2\theta \neq 0$, we divide by it.
\[ x\,\frac{d\theta}{dx} = 1 \quad \Rightarrow \quad d\theta = \frac{dx}{x} \]

Step 4: Integrate and go back:
Integrating gives $\theta = \log|x| + C$.
Since $\tan\theta = \frac{y}{x}$, we have $y = x\tan(\log|x| + C)$.
A quick check: for $y = x\tan\theta$ with $\theta = \log|x| + C$, the derivative is $\tan\theta + \sec^2\theta$, which equals the right side.

Final Answer:
The general solution is below. \[ \boxed{y = x\tan\left(\log|x| + C\right)} \]
Was this answer helpful?
0