24.1.15 problem 3(a)

Internal problem ID [4204]
Book : Elementary Differential equations, Chaundy, 1969
Section : Exercises 3, page 60
Problem number : 3(a)
Date solved : Monday, January 27, 2025 at 08:42:06 AM
CAS classification : [_linear]

\begin{align*} \tan \left (x \right ) y^{\prime }&=y-\cos \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.001 (sec). Leaf size: 15

dsolve(tan(x)*diff(y(x),x)=y(x)-cos(x),y(x), singsol=all)
 
\[ y \left (x \right ) = \left (\cot \left (x \right )-\frac {\pi }{2}+x +c_{1} \right ) \sin \left (x \right ) \]

Solution by Mathematica

Time used: 0.054 (sec). Leaf size: 28

DSolve[Tan[x]*D[y[x],x]==y[x]-Cos[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \cos (x) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\tan ^2(x)\right )+c_1 \sin (x) \]