40.3.28 problem 26 (b)

Internal problem ID [6632]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 5. Equations of first order and first degree (Exact equations). Supplemetary problems. Page 33
Problem number : 26 (b)
Date solved : Wednesday, March 05, 2025 at 01:34:03 AM
CAS classification : [_separable]

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

Maple. Time used: 0.007 (sec). Leaf size: 15
ode:=1+y(x)^2 = (x^2+x)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (-\ln \left (x +1\right )+\ln \left (x \right )+c_1 \right ) \]
Mathematica. Time used: 0.3 (sec). Leaf size: 31
ode=1+y[x]^2==(x+x^2)*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \tan (\log (x)-\log (x+1)+c_1) \\ y(x)\to -i \\ y(x)\to i \\ \end{align*}
Sympy. Time used: 0.580 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x**2 - x)*Derivative(y(x), x) + y(x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \tan {\left (C_{1} + \log {\left (x \right )} - \log {\left (x + 1 \right )} \right )} \]