15.1.13 problem 13

Internal problem ID [2853]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 13
Date solved : Sunday, March 30, 2025 at 12:34:19 AM
CAS classification : [_separable]

\begin{align*} x y^{\prime }+y&=y^{2} \end{align*}

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