8.4.19 problem 19

Internal problem ID [722]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.5. Linear first order equations. Page 56
Problem number : 19
Date solved : Monday, January 27, 2025 at 02:59:12 AM
CAS classification : [_linear]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.035 (sec). Leaf size: 19

DSolve[Cot[x]*y[x]+D[y[x],x] == Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\frac {1}{2} \cos (x) \cot (x)+c_1 \csc (x) \]