29.19.10 problem 523

Internal problem ID [5119]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 19
Problem number : 523
Date solved : Sunday, March 30, 2025 at 06:41:30 AM
CAS classification : [_rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.003 (sec). Leaf size: 125
ode:=x*(4+y(x))*diff(y(x),x) = 2*x+2*y(x)+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= x \\ y &= \frac {-\sqrt {4+x}\, \sqrt {\frac {c_1 \left (4+x \right )-4}{4+x}}\, x -4 \sqrt {x}}{-\sqrt {4+x}\, \sqrt {\frac {c_1 \left (4+x \right )-4}{4+x}}+\sqrt {x}} \\ y &= \frac {\sqrt {4+x}\, \sqrt {\frac {c_1 \left (4+x \right )-4}{4+x}}\, x -4 \sqrt {x}}{\sqrt {4+x}\, \sqrt {\frac {c_1 \left (4+x \right )-4}{4+x}}+\sqrt {x}} \\ \end{align*}
Mathematica. Time used: 1.185 (sec). Leaf size: 89
ode=x(4+y[x])D[y[x],x]==2 x+2 y[x]+y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -4+\frac {1}{\frac {1}{x+4}-\frac {\sqrt {x}}{(x+4)^{3/2} \sqrt {-\frac {4}{x+4}+c_1}}} \\ y(x)\to -4+\frac {1}{\frac {1}{x+4}+\frac {\sqrt {x}}{(x+4)^{3/2} \sqrt {-\frac {4}{x+4}+c_1}}} \\ y(x)\to x \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(y(x) + 4)*Derivative(y(x), x) - 2*x - y(x)**2 - 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out