67.2.46 problem Problem 18(k)

Internal problem ID [14003]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 4, Second and Higher Order Linear Differential Equations. Problems page 221
Problem number : Problem 18(k)
Date solved : Tuesday, January 28, 2025 at 06:11:28 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.011 (sec). Leaf size: 37

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

Solution by Mathematica

Time used: 0.205 (sec). Leaf size: 59

DSolve[D[y[x],{x,2}]+Cot[x]*D[y[x],x]-Csc[x]^2*y[x]==Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {\int _1^x\cos (K[1]) \cot (K[1]) \sqrt {\sin ^2(K[1])}dK[1]-\cos (x) \left (\sqrt {\sin ^2(x)}+i c_2\right )+c_1}{\sqrt {\sin ^2(x)}} \]