81.6.10 problem 10

Internal problem ID [18693]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter V. Homogeneous linear differential equations. Exact equations. Exercises at page 69
Problem number : 10
Date solved : Tuesday, January 28, 2025 at 12:10:31 PM
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.079 (sec). Leaf size: 27

dsolve(diff(y(x),x$2)-cot(x)*diff(y(x),x)+csc(x)^2*y(x)=cos(x),y(x), singsol=all)
 
\[ y \left (x \right ) = \sin \left (x \right ) \left (\int \cos \left (x \right ) \operatorname {arctanh}\left (\sec \left (x \right )\right )d x +\left (c_{1} -\sin \left (x \right )\right ) \operatorname {arctanh}\left (\sec \left (x \right )\right )+c_{2} \right ) \]

Solution by Mathematica

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

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 \sin (x) (-c_1 \text {arctanh}(\cos (x))+x+c_2) \]