24.1.12 problem 3(a)

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

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.065 (sec). Leaf size: 45

DSolve[Cot[x]*D[y[x],x]+y[x]==x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x+\cos (x) \left (\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )+c_1\right ) \]