76.4.4 problem 4

Internal problem ID [17327]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.6 (Exact equations and integrating factors). Problems at page 100
Problem number : 4
Date solved : Monday, March 31, 2025 at 03:52:57 PM
CAS classification : [_separable]

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

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