3.25 problem Problem 32

Internal problem ID [2154]

Book: Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section: Chapter 1, First-Order Differential Equations. Section 1.6, First-Order Linear Differential Equations. page 59
Problem number: Problem 32.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_linear]

\[ \boxed {y^{\prime }+\cot \left (x \right ) y-2 \cos \left (x \right )=0} \]

Solution by Maple

Time used: 0.0 (sec). Leaf size: 17

dsolve(diff(y(x),x)+y(x)*cot(x)=2*cos(x),y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {-\frac {\cos \left (2 x \right )}{2}+c_{1}}{\sin \left (x \right )} \]

Solution by Mathematica

Time used: 0.042 (sec). Leaf size: 17

DSolve[y'[x]+y[x]*Cot[x]==2*Cos[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \sin (x)+\left (-\frac {1}{2}+c_1\right ) \csc (x) \\ \end{align*}