32.5.26 problem Exercise 11.28, page 97

Internal problem ID [5864]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 11, Bernoulli Equations
Problem number : Exercise 11.28, page 97
Date solved : Tuesday, March 04, 2025 at 11:49:24 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Riccati]

\begin{align*} y^{\prime }&=\frac {1}{x^{2}}-\frac {y}{x}-y^{2} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 16
ode:=diff(y(x),x) = 1/x^2-y(x)/x-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = -\frac {\tanh \left (c_{1} -\ln \left (x \right )\right )}{x} \]
Mathematica. Time used: 1.208 (sec). Leaf size: 62
ode=D[y[x],x]==1/x^2-y[x]/x-y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {i \tan (c_1-i \log (x))}{x} \\ y(x)\to -\frac {-x^2+e^{2 i \text {Interval}[\{0,\pi \}]}}{x^3+x e^{2 i \text {Interval}[\{0,\pi \}]}} \\ \end{align*}
Sympy. Time used: 0.154 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**2 + Derivative(y(x), x) + y(x)/x - 1/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {i \tan {\left (C_{1} + i \log {\left (x \right )} \right )}}{x} \]