4.6 problem 9.1 (vi)

Internal problem ID [11680]

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).
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_linear]

\[ \boxed {y^{\prime }+2 y \cot \left (x \right )=5} \] With initial conditions \begin {align*} \left [y \left (\frac {\pi }{2}\right ) = 1\right ] \end {align*}

Solution by Maple

Time used: 0.016 (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 \left (x \right ) = \frac {-10 x +5 \sin \left (2 x \right )-4+5 \pi }{-2+2 \cos \left (2 x \right )} \]

Solution by Mathematica

Time used: 0.082 (sec). Leaf size: 27

DSolve[{y'[x]+2*y[x]*Cot[x]==5,{y[Pi/2]==1}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to \frac {1}{4} (10 x-5 \sin (2 x)-5 \pi +4) \csc ^2(x) \]