23.1.441 problem 431

Internal problem ID [5048]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 431
Date solved : Tuesday, September 30, 2025 at 11:30:00 AM
CAS classification : [_Bernoulli]

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