71.4.22 problem 22

Internal problem ID [14394]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.2, page 53
Problem number : 22
Date solved : Tuesday, January 28, 2025 at 06:29:33 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (\frac {\pi }{2}\right )&=1 \end{align*}

Solution by Maple

Time used: 0.012 (sec). Leaf size: 11

dsolve([diff(y(x),x)=cot(x)*y(x)+csc(x),y(1/2*Pi) = 1],y(x), singsol=all)
 
\[ y = \sin \left (x \right )-\cos \left (x \right ) \]

Solution by Mathematica

Time used: 0.051 (sec). Leaf size: 26

DSolve[{D[y[x],x]==Cot[x]*y[x]+Csc[x],{y[Pi/2]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \sin (x) \left (\int _{\frac {\pi }{2}}^x\csc ^2(K[1])dK[1]+1\right ) \]