73.5.19 problem 6.7 (g)

Internal problem ID [15059]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 6. Simplifying through simplifiction. Additional exercises. page 114
Problem number : 6.7 (g)
Date solved : Monday, March 31, 2025 at 01:18:08 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.003 (sec). Leaf size: 30
ode:=(2*x*y(x)+2*x^2)*diff(y(x),x) = x^2+2*x*y(x)+2*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\left (1+\sqrt {1+\ln \left (x \right )+c_1}\right ) x \\ y &= \left (-1+\sqrt {1+\ln \left (x \right )+c_1}\right ) x \\ \end{align*}
Mathematica. Time used: 0.316 (sec). Leaf size: 42
ode=(2*x*y[x]+2*x^2)*D[y[x],x]==x^2+2*x*y[x]+2*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x \left (1+\sqrt {\log (x)+1+2 c_1}\right ) \\ y(x)\to x \left (-1+\sqrt {\log (x)+1+2 c_1}\right ) \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - 2*x*y(x) + (2*x**2 + 2*x*y(x))*Derivative(y(x), x) - 2*y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : cannot determine truth value of Relational