85.19.1 problem 1

Internal problem ID [22558]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. B Exercises at page 52
Problem number : 1
Date solved : Thursday, October 02, 2025 at 08:50:43 PM
CAS classification : [_Bernoulli]

\begin{align*} y^{\prime }&=\frac {3 y^{2} \cot \left (x \right )+\sin \left (x \right ) \cos \left (x \right )}{2 y} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 30
ode:=diff(y(x),x) = 1/2*(3*y(x)^2*cot(x)+cos(x)*sin(x))/y(x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {\sin \left (x \right ) c_1 -1}\, \sin \left (x \right ) \\ y &= -\sqrt {\sin \left (x \right ) c_1 -1}\, \sin \left (x \right ) \\ \end{align*}
Mathematica. Time used: 0.442 (sec). Leaf size: 38
ode=D[y[x],x]==  (3*y[x]^2*Cot[x]+Sin[x]*Cos[x])/(2*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sin (x) \sqrt {-1+c_1 \sin (x)}\\ y(x)&\to \sin (x) \sqrt {-1+c_1 \sin (x)} \end{align*}
Sympy. Time used: 1.468 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(3*y(x)**2*cot(x) + sin(x)*cos(x))/(2*y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1} \sin {\left (x \right )} - 1} \sin {\left (x \right )}, \ y{\left (x \right )} = \sqrt {C_{1} \sin {\left (x \right )} - 1} \sin {\left (x \right )}\right ] \]