29.13.10 problem 364

Internal problem ID [4964]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 13
Problem number : 364
Date solved : Tuesday, March 04, 2025 at 07:37:23 PM
CAS classification : [[_homogeneous, `class D`], _rational, _Bernoulli]

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

Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=x^2*(1-x)*diff(y(x),x) = (2-x)*x*y(x)-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {x^{2}}{1+c_{1} \left (x -1\right )} \]
Mathematica. Time used: 0.222 (sec). Leaf size: 25
ode=x^2(1-x)D[y[x],x]==(2-x)x y[x]-y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x^2}{c_1 (-x)+1+c_1} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.304 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*(1 - x)*Derivative(y(x), x) - x*(2 - x)*y(x) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{2}}{C_{1} x - C_{1} + 1} \]