60.1.94 problem 96

Internal problem ID [10108]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 96
Date solved : Sunday, March 30, 2025 at 03:16:20 PM
CAS classification : [_separable]

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

Maple. Time used: 0.004 (sec). Leaf size: 11
ode:=x*diff(y(x),x)-y(x)^2+1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\tanh \left (\ln \left (x \right )+c_1 \right ) \]
Mathematica. Time used: 0.228 (sec). Leaf size: 43
ode=x*D[y[x],x] - y[x]^2 + 1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{(K[1]-1) (K[1]+1)}dK[1]\&\right ][\log (x)+c_1] \\ y(x)\to -1 \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.327 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - y(x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- x^{2} e^{2 C_{1}} - 1}{x^{2} e^{2 C_{1}} - 1} \]