75.3.9 problem 9

Internal problem ID [19913]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter III. Ordinary differential equations of the first order and first degree. Exercises at page 33
Problem number : 9
Date solved : Thursday, October 02, 2025 at 05:00:58 PM
CAS classification : [_separable]

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