# I have a problem solving this differential equation

$$xdy-ydx=\left(x^2+y^2\right)dx$$

How can I solve this differential equation? which type is this equation? I don't think it is separable and I don't think it's linear too, but it might be homogenous or exact maybe!

I tried to take partial derivatives of them by splitting them into $$P(x)$$ and $$Q(x)$$ to know if it's exact or not, but I didn't get any solutions.

which type this equation is and what's the answer with steps, please!

• Note that by dividing both sides by $dx$ and rearranging you can rewrite this as: $$xy'-y(y+1)=x^2$$ – Henry Lee Apr 27 '19 at 15:49

Hint: Substituting $$y(x)=xv(x)$$ then we get $$\frac{d v(x)}{dx}=v(x)^2+1$$ Can you finish? From $$y=xv(x)$$ we get $$x(v(x)+xv'(x))-xv(x)=x^2+x^2v(x)$$
Introducing polar coordinates, $$x = r \cos\alpha, \ y = r \sin\alpha,$$ we have $$dx = dr \cos\alpha - r \sin\alpha \, d\alpha, \quad dy = dr \sin\alpha + r \cos\alpha \, d\alpha,$$ which with a partial substitution into the differential equation gives $$r^2 \, d\alpha = r^2 dx .$$
Thus, for $$r \neq 0,$$ we have $$d\alpha = dx.$$ This can easily be solved: $$x = x_0 + \alpha.$$
Now, $$y = x \tan\alpha = (x_0 + \alpha) \tan(\alpha).$$
Thus, \begin{align} x &= x_0+\alpha, \\ y &= (x_0+\alpha) \tan\alpha, \end{align} where we can consider $$\alpha$$ be a parameter.