23.2.79 problem 81

Internal problem ID [5434]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 2. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF SECOND OR HIGHER DEGREE, page 278
Problem number : 81
Date solved : Tuesday, September 30, 2025 at 12:42:20 PM
CAS classification : [_separable]

\begin{align*} {y^{\prime }}^{2}+2 y y^{\prime } \cot \left (x \right )-y^{2}&=0 \end{align*}
Maple. Time used: 0.078 (sec). Leaf size: 39
ode:=diff(y(x),x)^2+2*y(x)*diff(y(x),x)*cot(x)-y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= 0 \\ y &= \frac {c_1 \,\operatorname {csgn}\left (\sin \left (x \right )\right )}{\cos \left (x \right )+\operatorname {csgn}\left (\sec \left (x \right )\right )} \\ y &= c_1 \left (\cos \left (x \right )+\operatorname {csgn}\left (\sec \left (x \right )\right )\right ) \operatorname {csgn}\left (\sin \left (x \right )\right ) \csc \left (x \right )^{2} \\ \end{align*}
Mathematica. Time used: 0.089 (sec). Leaf size: 36
ode=(D[y[x],x])^2+2 y[x] D[y[x],x] Cot[x]-y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \csc ^2\left (\frac {x}{2}\right )\\ y(x)&\to c_1 \sec ^2\left (\frac {x}{2}\right )\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 5.524 (sec). Leaf size: 48
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)**2 + 2*y(x)*Derivative(y(x), x)/tan(x) + Derivative(y(x), x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {C_{1} e^{\int \frac {\sqrt {\frac {1}{\cos ^{2}{\left (x \right )}}}}{\tan {\left (x \right )}}\, dx}}{\sin {\left (x \right )}}, \ y{\left (x \right )} = \frac {C_{1} e^{- \int \frac {\sqrt {\frac {1}{\cos ^{2}{\left (x \right )}}}}{\tan {\left (x \right )}}\, dx}}{\sin {\left (x \right )}}\right ] \]