82.2.3 problem Ex. 3

Internal problem ID [18650]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Exercises at page 14
Problem number : Ex. 3
Date solved : Thursday, March 13, 2025 at 12:27:46 PM
CAS classification : [_separable]

\begin{align*} y-x y^{\prime }&=a \left (y^{2}+y^{\prime }\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 \left (x \right ) = \frac {a +x}{a x +c_{1}} \]
Mathematica. Time used: 0.612 (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.357 (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} \]