72.8.50 problem 50

Internal problem ID [19534]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Miscellaneous Problems for Chapter 2. Problems at page 99
Problem number : 50
Date solved : Thursday, October 02, 2025 at 04:39:49 PM
CAS classification : [_linear]

\begin{align*} x^{\prime }+x \cot \left (y \right )&=\sec \left (y \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 14
ode:=diff(x(y),y)+x(y)*cot(y) = sec(y); 
dsolve(ode,x(y), singsol=all);
 
\[ x = \left (-\ln \left (\cos \left (y \right )\right )+c_1 \right ) \csc \left (y \right ) \]
Mathematica. Time used: 0.027 (sec). Leaf size: 16
ode=D[x[y],y] + x[y]*Cot[y] == Sec[y]; 
ic={}; 
DSolve[{ode,ic},x[y],y,IncludeSingularSolutions->True]
 
\begin{align*} x(y)&\to \csc (y) (-\log (\cos (y))+c_1) \end{align*}
Sympy. Time used: 0.429 (sec). Leaf size: 12
from sympy import * 
y = symbols("y") 
x = Function("x") 
ode = Eq(x(y)/tan(y) + Derivative(x(y), y) - 1/cos(y),0) 
ics = {} 
dsolve(ode,func=x(y),ics=ics)
 
\[ x{\left (y \right )} = \frac {C_{1} - \log {\left (\cos {\left (y \right )} \right )}}{\sin {\left (y \right )}} \]