23.1.242 problem 237

Internal problem ID [4849]
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 : 237
Date solved : Tuesday, September 30, 2025 at 08:44:15 AM
CAS classification : [_separable]

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