23.1.329 problem 315

Internal problem ID [4936]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 315
Date solved : Tuesday, September 30, 2025 at 09:03:22 AM
CAS classification : [_linear]

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