23.1.4 problem 1(d)

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

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

Maple. Time used: 0.006 (sec). Leaf size: 55
ode:=x^2+x-1+(2*x*y(x)+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\sqrt {-2 x^{2}+5 \ln \left (2 x +1\right )+4 c_1 -2 x}}{2} \\ y &= \frac {\sqrt {-2 x^{2}+5 \ln \left (2 x +1\right )+4 c_1 -2 x}}{2} \\ \end{align*}
Mathematica. Time used: 0.11 (sec). Leaf size: 73
ode=(x^2+x-1)+(2*x*y[x]+y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {1}{2} \sqrt {-2 x^2-2 x+5 \log (2 x+1)-\frac {1}{2}+8 c_1} \\ y(x)\to \frac {1}{2} \sqrt {-2 x^2-2 x+5 \log (2 x+1)-\frac {1}{2}+8 c_1} \\ \end{align*}
Sympy. Time used: 0.627 (sec). Leaf size: 53
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + x + (2*x*y(x) + y(x))*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {C_{1} - 2 x^{2} - 2 x + 5 \log {\left (2 x + 1 \right )}}}{2}, \ y{\left (x \right )} = \frac {\sqrt {C_{1} - 2 x^{2} - 2 x + 5 \log {\left (2 x + 1 \right )}}}{2}\right ] \]