80.3.32 problem 35

Internal problem ID [21196]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 35
Date solved : Thursday, October 02, 2025 at 07:26:12 PM
CAS classification : [_linear]

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