87.4.16 problem 27

Internal problem ID [23282]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 37
Problem number : 27
Date solved : Thursday, October 02, 2025 at 09:28:29 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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