78.4.19 problem 20

Internal problem ID [18063]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 8 (Exact Equations). Problems at page 72
Problem number : 20
Date solved : Thursday, March 13, 2025 at 11:28:04 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _exact, _rational]

\begin{align*} \frac {y-x y^{\prime }}{\left (x +y\right )^{2}}+y^{\prime }&=1 \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 61
ode:=(y(x)-x*diff(y(x),x))/(x+y(x))^2+diff(y(x),x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {c_1}{4}+\frac {1}{4}-\frac {\sqrt {c_1^{2}+\left (8 x +2\right ) c_1 +16 \left (x -\frac {1}{4}\right )^{2}}}{4} \\ y &= \frac {c_1}{4}+\frac {1}{4}+\frac {\sqrt {c_1^{2}+\left (8 x +2\right ) c_1 +16 \left (x -\frac {1}{4}\right )^{2}}}{4} \\ \end{align*}
Mathematica. Time used: 0.427 (sec). Leaf size: 76
ode=(y[x]-x*D[y[x],x])/(x+y[x])^2+D[y[x],x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (-\sqrt {4 x^2+4 c_1 x+(1+c_1){}^2}+1+c_1\right ) \\ y(x)\to \frac {1}{2} \left (\sqrt {4 x^2+4 c_1 x+(1+c_1){}^2}+1+c_1\right ) \\ y(x)\to -x \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1 + (-x*Derivative(y(x), x) + y(x))/(x + y(x))**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out