56.6.1 problem Ex 1

Internal problem ID [14100]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 13. Linear equations of first order. Page 19
Problem number : Ex 1
Date solved : Thursday, October 02, 2025 at 09:13:37 AM
CAS classification : [_linear]

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