23.1.550 problem 540

Internal problem ID [5157]
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 : 540
Date solved : Tuesday, September 30, 2025 at 11:46:58 AM
CAS classification : [_separable]

\begin{align*} y \left (1-x \right ) y^{\prime }+x \left (1-y\right )&=0 \end{align*}
Maple. Time used: 0.022 (sec). Leaf size: 22
ode:=y(x)*(1-x)*diff(y(x),x)+x*(1-y(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {LambertW}\left (\frac {{\mathrm e}^{-x -1}}{\left (x -1\right ) c_1}\right )+1 \]
Mathematica. Time used: 0.1 (sec). Leaf size: 49
ode=y[x]*(1-x)*D[y[x],x]+x*(1-y[x])==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {K[1]}{K[1]-1}dK[1]\&\right ]\left [\int _1^x-\frac {K[2]}{K[2]-1}dK[2]+c_1\right ]\\ y(x)&\to 1 \end{align*}
Sympy. Time used: 0.236 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(1 - y(x)) + (1 - x)*y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = W\left (\frac {C_{1} e^{- x - 1}}{x - 1}\right ) + 1 \]