77.3.16 problem 16

Internal problem ID [20357]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Exercise II (B) at page 9
Problem number : 16
Date solved : Thursday, October 02, 2025 at 05:47:06 PM
CAS classification : [_separable]

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