share
MathematicsSolve $dy/dx=x^2+xy+y^2$.
[+1] [1] asd asd
[2022-09-12 14:56:48]
[ ordinary-differential-equations ]
[ https://math.stackexchange.com/questions/4529949/solve-dy-dx-x2xyy2 ]

Wolfram say's that the answer is $y=\dfrac{1}{c-x}-\dfrac{x}{2}$. But i don't know how to get there. I try this, $dy/dx=(x+y)^2-xy$. And substitute $y=vx$, but i don't get anywhere. Any help?

(2) Try converting to polar coordinates. This will make the RHS separable. - user1064129
If i do $x=r\cos\theta$ and $y=r\sin\theta$, then what is $dy/dx$? @Doug - asd asd
My apologies. The derivative on left side is not separable. I don't think polar coords is the way to go. - user1064129
(4) The right side is quadratic in $y$, thus you have a Riccati equation. One transformation is to set $y=-\frac{u'}{u}$. - Lutz Lehmann
Please check that the Wolfram solution is actually for the equation in the title. The limit case $y=-\frac{x}2$ does not appear to be a solution. - Lutz Lehmann
@Lutz Indeed reporting $\frac 1{c-x}-\frac x2$ in the ODE gives $\frac 12+\frac {3x^2}4$ which is not zero. So WA is wrong here. - zwim
[+1] [2022-09-13 08:09:46] JJacquelin [ACCEPTED]

$y=\dfrac{1}{c-x}-\dfrac{x}{2}\quad$ is not solution of $\quad \dfrac{dy}{dx}=x^2+xy+y^2\tag 1$.

$y=\dfrac{1}{c-x}-\dfrac{x}{2}\quad$ is solution of $\quad \dfrac{dy}{dx}=\frac14 x^2+xy+y^2-\frac12\tag 2$.

Both ODEs are of Riccati kind. The change of function is $$y(x)=-\frac{u'(x)}{u(x)} \quad\implies\quad y'=-\frac{u''}{u}+\frac{(u')^2}{u^2}$$

Case of ODE $(2)$ : $$\dfrac{dy}{dx}=\frac14 x^2+xy+y^2-\frac12=-\frac{u''}{u}+\frac{(u')^2}{u^2}=\frac14 x^2+x\left(-\frac{u'}{u}\right)+\left(-\frac{u'}{u}\right)^2-\frac12$$ $$u''-xu'+\left(\frac14 x^2-\frac12\right)u=0$$ This is a linear second order ODE. Solving it leads to : $$u=(c_1+c_2 x)\exp(\frac14 x^2)$$ $$y=-\frac{u'}{u}=-\frac{c_1x+2c_2+c_2x^2}{2(c_1+c_2x)}$$ And with $c=-\frac{c_1}{c_2}$ we get to the expected result : $$y=\dfrac{1}{c-x}-\frac{x}{2}$$

Case of ODE $(1)$ : $$\dfrac{dy}{dx}=x^2+xy+y^2=-\frac{u''}{u}+\frac{(u')^2}{u^2}=x^2+x\left(-\frac{u'}{u}\right)+\left(-\frac{u'}{u}\right)^2$$ $$u''-xu'+x^2u=0$$ This linear second order ODE is solvable involving confluent hypergeometric functions. I suppose that you are not interested for the complicated final analytic solution $y(x)$.


Yep, I had indicated the last ODE as a duplicate, but for some reason it was dismissed. The link is still there, after $-\frac{u'}u$ change, it can be integrated as a Sturm-Liouville DE with $e^{-x^2/2}$ integration factor or like in the linked answer as a Weber one with $e^{-x^2/4}$. - zwim
1