64.6.3 problem 3

Internal problem ID [13282]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Miscellaneous Review. Exercises page 60
Problem number : 3
Date solved : Monday, March 31, 2025 at 07:45:11 AM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=y(x)-1+x*(1+x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 x +c_1 -1}{x} \]
Mathematica. Time used: 0.189 (sec). Leaf size: 74
ode=(y[x]-1)+(x*(x+1))*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \exp \left (\int _1^x-\frac {1}{K[1]^2+K[1]}dK[1]\right ) \left (\int _1^x\frac {\exp \left (-\int _1^{K[2]}-\frac {1}{K[1]^2+K[1]}dK[1]\right )}{K[2]^2+K[2]}dK[2]+c_1\right ) \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.287 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(x + 1)*Derivative(y(x), x) + y(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \frac {C_{1}}{x} + 1 \]