60.1.237 problem 242

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

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

Maple. Time used: 0.005 (sec). Leaf size: 39
ode:=2*x*y(x)*diff(y(x),x)+2*y(x)^2+1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\sqrt {-2 x^{2}+4 c_1}}{2 x} \\ y &= \frac {\sqrt {-2 x^{2}+4 c_1}}{2 x} \\ \end{align*}
Mathematica. Time used: 0.334 (sec). Leaf size: 128
ode=2*x*y[x]*D[y[x],x]+2*y[x]^2+1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {-x^2+e^{4 c_1}}}{\sqrt {2} x} \\ y(x)\to \frac {\sqrt {-x^2+e^{4 c_1}}}{\sqrt {2} x} \\ y(x)\to -\frac {i}{\sqrt {2}} \\ y(x)\to \frac {i}{\sqrt {2}} \\ y(x)\to \frac {x}{\sqrt {2} \sqrt {-x^2}} \\ y(x)\to \frac {\sqrt {-x^2}}{\sqrt {2} x} \\ \end{align*}
Sympy. Time used: 0.592 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x)*Derivative(y(x), x) + 2*y(x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {\frac {C_{1}}{x^{2}} - 2}}{2}, \ y{\left (x \right )} = \frac {\sqrt {\frac {C_{1}}{x^{2}} - 2}}{2}\right ] \]