23.1.341 problem 327

Internal problem ID [4948]
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 : 327
Date solved : Tuesday, September 30, 2025 at 09:03:54 AM
CAS classification : [_separable]

\begin{align*} \left (x -a \right ) \left (x -b \right ) y^{\prime }&=c y^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 37
ode:=(x-a)*(x-b)*diff(y(x),x) = c*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {a -b}{-c \ln \left (x -a \right )+c \ln \left (x -b \right )+\left (a -b \right ) c_1} \]
Mathematica. Time used: 0.326 (sec). Leaf size: 43
ode=(x-a)*(x-b)*D[y[x],x]==c*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{\int _1^x-\frac {c}{(a-K[1]) (K[1]-b)}dK[1]+c_1}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.293 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-c*y(x)**2 + (-a + x)*(-b + x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- a + b}{C_{1} a - C_{1} b + c \log {\left (- a + x \right )} - c \log {\left (- b + x \right )}} \]