80.2.5 problem 6

Internal problem ID [18473]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter IV. Methods of solution: First order equations. section 24. Problems at page 62
Problem number : 6
Date solved : Monday, March 31, 2025 at 05:31:17 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=1+\frac {1}{x}-\frac {1}{y^{2}+2}-\frac {1}{x \left (y^{2}+2\right )} \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 18
ode:=diff(y(x),x) = 1+1/x-1/(y(x)^2+2)-1/x/(y(x)^2+2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (\operatorname {RootOf}\left (x +\ln \left (x \right )-\tan \left (\textit {\_Z} \right )-\textit {\_Z} +c_1 \right )\right ) \]
Mathematica. Time used: 0.304 (sec). Leaf size: 19
ode=D[y[x],x]==1+1/x-1/(y[x]^2+2)-1/(x*(y[x]^2+2)); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \text {InverseFunction}[\arctan (\text {$\#$1})+\text {$\#$1}\&][x+\log (x)+c_1] \]
Sympy. Time used: 0.283 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1 + 1/(y(x)**2 + 2) - 1/x + 1/(x*(y(x)**2 + 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - x + y{\left (x \right )} - \log {\left (x \right )} + \operatorname {atan}{\left (y{\left (x \right )} \right )} = C_{1} \]