88.9.9 problem 9

Internal problem ID [24029]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 2. Differential equations of first order. Exercise at page 48
Problem number : 9
Date solved : Thursday, October 02, 2025 at 09:54:39 PM
CAS classification : [_linear]

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