69.6.30 problem 163

Internal problem ID [18073]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 163
Date solved : Thursday, October 02, 2025 at 02:37:12 PM
CAS classification : [_Bernoulli]

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