21.1.5 problem 5

Internal problem ID [4081]
Book : Differential equations, Shepley L. Ross, 1964
Section : 2.4, page 55
Problem number : 5
Date solved : Tuesday, March 04, 2025 at 05:24:21 PM
CAS classification : [[_homogeneous, `class C`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.556 (sec). Leaf size: 32
ode:=5*x+2*y(x)+1+(2*x+y(x)+1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {-\sqrt {-\left (x -1\right )^{2} c_{1}^{2}+1}+\left (-2 x -1\right ) c_{1}}{c_{1}} \]
Mathematica. Time used: 0.154 (sec). Leaf size: 53
ode=(5*x+2*y[x]+1)+(2*x+y[x]+1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {-x^2+2 x+1+c_1}-2 x-1 \\ y(x)\to \sqrt {-x^2+2 x+1+c_1}-2 x-1 \\ \end{align*}
Sympy. Time used: 1.954 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(5*x + (2*x + y(x) + 1)*Derivative(y(x), x) + 2*y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - 2 x - \sqrt {C_{1} - x^{2} + 2 x} - 1, \ y{\left (x \right )} = - 2 x + \sqrt {C_{1} - x^{2} + 2 x} - 1\right ] \]