29.20.8 problem 553

Internal problem ID [5149]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 20
Problem number : 553
Date solved : Sunday, March 30, 2025 at 06:45:21 AM
CAS classification : [_exact, _rational, _Bernoulli]

\begin{align*} 2 \left (1+x \right ) y y^{\prime }+2 x -3 x^{2}+y^{2}&=0 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 52
ode:=2*(1+x)*y(x)*diff(y(x),x)+2*x-3*x^2+y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {\left (1+x \right ) \left (x^{3}-x^{2}+c_1 \right )}}{1+x} \\ y &= -\frac {\sqrt {\left (1+x \right ) \left (x^{3}-x^{2}+c_1 \right )}}{1+x} \\ \end{align*}
Mathematica. Time used: 0.323 (sec). Leaf size: 56
ode=2(1+x)y[x] D[y[x],x]+2 x-3 x^2+y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {x^3-x^2+c_1}}{\sqrt {x+1}} \\ y(x)\to \frac {\sqrt {x^3-x^2+c_1}}{\sqrt {x+1}} \\ \end{align*}
Sympy. Time used: 0.703 (sec). Leaf size: 56
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x**2 + 2*x + (2*x + 2)*y(x)*Derivative(y(x), x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {2} \sqrt {\frac {C_{1} + 2 x^{3} - 2 x^{2}}{x + 1}}}{2}, \ y{\left (x \right )} = \frac {\sqrt {2} \sqrt {\frac {C_{1} + 2 x^{3} - 2 x^{2}}{x + 1}}}{2}\right ] \]