60.1.262 problem 267

Internal problem ID [10276]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 267
Date solved : Wednesday, March 05, 2025 at 08:56:53 AM
CAS classification : [_exact, _Bernoulli]

\begin{align*} y y^{\prime } \sin \left (x \right )^{2}+y^{2} \cos \left (x \right ) \sin \left (x \right )-1&=0 \end{align*}

Maple. Time used: 0.033 (sec). Leaf size: 28
ode:=y(x)*diff(y(x),x)*sin(x)^2+y(x)^2*cos(x)*sin(x)-1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \csc \left (x \right ) \sqrt {c_{1} +2 x} \\ y &= -\csc \left (x \right ) \sqrt {c_{1} +2 x} \\ \end{align*}
Mathematica. Time used: 0.478 (sec). Leaf size: 36
ode=y[x]*D[y[x],x]*Sin[x]^2+y[x]^2*Cos[x]*Sin[x]-1==0; 
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.461 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**2*sin(x)*cos(x) + y(x)*sin(x)**2*Derivative(y(x), x) - 1,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 ] \]