58.2.39 problem 39

Internal problem ID [9162]
Book : Second order enumerated odes
Section : section 2
Problem number : 39
Date solved : Monday, January 27, 2025 at 05:51:27 PM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.002 (sec). Leaf size: 16

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

Solution by Mathematica

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

DSolve[D[y[x],x]+y[x]*Cot[x]==2*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \csc (x) \left (\int _1^x\sin (2 K[1])dK[1]+c_1\right ) \]