24.1.13 problem 3(b)

Internal problem ID [4202]
Book : Elementary Differential equations, Chaundy, 1969
Section : Exercises 3, page 60
Problem number : 3(b)
Date solved : Monday, January 27, 2025 at 08:42:01 AM
CAS classification : [_linear]

\begin{align*} \cot \left (x \right ) y^{\prime }+y&=\tan \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.001 (sec). Leaf size: 23

dsolve(cot(x)*diff(y(x),x)+y(x)=tan(x),y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {\tan \left (x \right )}{2}-\frac {\cos \left (x \right ) \ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{2}+\cos \left (x \right ) c_{1} \]

Solution by Mathematica

Time used: 0.058 (sec). Leaf size: 25

DSolve[Cot[x]*D[y[x],x]+y[x]==Tan[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{2} (\cos (x) (-\text {arctanh}(\sin (x)))+\tan (x)+2 c_1 \cos (x)) \]