71.7.13 problem 17

Internal problem ID [14363]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.3.3, page 71
Problem number : 17
Date solved : Monday, March 31, 2025 at 12:19:29 PM
CAS classification : [_separable]

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

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