32.2.48 problem 49

Internal problem ID [7765]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Further problems 24. page 1068
Problem number : 49
Date solved : Tuesday, September 30, 2025 at 05:05:12 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

\begin{align*} y^{\prime }+\frac {y}{x}&=x y^{2} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=diff(y(x),x)+y(x)/x = x*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{\left (-x +c_1 \right ) x} \]
Mathematica. Time used: 0.087 (sec). Leaf size: 23
ode=D[y[x],x]+y[x]/x==x*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{x^2-c_1 x}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.109 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-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} - x\right )} \]