81.6.28 problem 7-27

Internal problem ID [21574]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 7. Linear Differential Equations. Page 101.
Problem number : 7-27
Date solved : Thursday, October 02, 2025 at 07:50:02 PM
CAS classification : [_separable]

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