73.3.1 problem 4.3 (a)

Internal problem ID [14964]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 4. SEPARABLE FIRST ORDER EQUATIONS. Additional exercises. page 90
Problem number : 4.3 (a)
Date solved : Monday, March 31, 2025 at 01:09:07 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 17
ode:=diff(y(x),x) = 3*y(x)^2-y(x)^2*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {1}{\cos \left (x \right )-c_1 +3 x} \]
Mathematica. Time used: 0.134 (sec). Leaf size: 31
ode=D[y[x],x]==3*y[x]^2-y[x]^2*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {1}{\int _1^x(3-\sin (K[1]))dK[1]+c_1} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.228 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**2*sin(x) - 3*y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {1}{C_{1} + 3 x + \cos {\left (x \right )}} \]