29.22.7 problem 613

Internal problem ID [5207]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 22
Problem number : 613
Date solved : Sunday, March 30, 2025 at 06:52:10 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational]

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

Maple. Time used: 0.015 (sec). Leaf size: 19
ode:=(1+y(x)+x*y(x)+y(x)^2)*diff(y(x),x)+1+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ -c_1 \left (1+y\right ) {\mathrm e}^{-y}+x +y = 0 \]
Mathematica. Time used: 0.174 (sec). Leaf size: 23
ode=(1+y[x]+x y[x]+y[x]^2)D[y[x],x]+1+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=-y(x)+c_1 e^{-y(x)} (y(x)+1),y(x)\right ] \]
Sympy. Time used: 0.936 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x*y(x) + y(x)**2 + y(x) + 1)*Derivative(y(x), x) + y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x e^{y{\left (x \right )}}}{y{\left (x \right )} + 1} + \frac {y{\left (x \right )} e^{y{\left (x \right )}}}{y{\left (x \right )} + 1} = 0 \]