78.8.50 problem 50

Internal problem ID [18177]
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 : Monday, March 31, 2025 at 05:21:53 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.04 (sec). Leaf size: 16
ode=D[x[y],y] + x[y]*Cot[y] == Sec[y]; 
ic={}; 
DSolve[{ode,ic},x[y],y,IncludeSingularSolutions->True]
 
\[ x(y)\to \csc (y) (-\log (\cos (y))+c_1) \]
Sympy. Time used: 0.675 (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 )}} \]