29.12.14 problem 333

Internal problem ID [4933]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 12
Problem number : 333
Date solved : Sunday, March 30, 2025 at 04:16:12 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

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

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