23.1.6 problem 1(f)

Internal problem ID [4096]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 2. First order equations. Exercises at page 14
Problem number : 1(f)
Date solved : Sunday, March 30, 2025 at 02:17:37 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 24
ode:=(1+x)*diff(y(x),x)-x^2*y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2}{x^{2}+2 \ln \left (x +1\right )-2 c_1 -2 x} \]
Mathematica. Time used: 0.176 (sec). Leaf size: 32
ode=(x+1)*D[y[x],x]-x^2*y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {2}{x^2-2 x+2 \log (x+1)-3+2 c_1} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.196 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*y(x)**2 + (x + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {2}{C_{1} + x^{2} - 2 x + 2 \log {\left (x + 1 \right )}} \]