65.4.6 problem 9.1 (vi)

Internal problem ID [13736]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 9, First order linear equations and the integrating factor. Exercises page 86
Problem number : 9.1 (vi)
Date solved : Tuesday, January 28, 2025 at 06:00:17 AM
CAS classification : [_linear]

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

With initial conditions

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

Solution by Maple

Time used: 0.043 (sec). Leaf size: 29

dsolve([diff(y(x),x)+2*y(x)*cot(x)=5,y(1/2*Pi) = 1],y(x), singsol=all)
 
\[ y = \frac {-10 x +5 \sin \left (2 x \right )-4+5 \pi }{2 \cos \left (2 x \right )-2} \]

Solution by Mathematica

Time used: 0.044 (sec). Leaf size: 30

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