29.15.20 problem 428

Internal problem ID [5026]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 428
Date solved : Sunday, March 30, 2025 at 06:30:34 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.491 (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.511 (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 ] \]