28.1.131 problem 154

Internal problem ID [4437]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 154
Date solved : Monday, January 27, 2025 at 09:17:22 AM
CAS classification : [_linear]

\begin{align*} y \sin \left (x \right )+\cos \left (x \right )^{2}-y^{\prime } \cos \left (x \right )&=0 \end{align*}

Solution by Maple

Time used: 0.002 (sec). Leaf size: 18

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

Solution by Mathematica

Time used: 0.039 (sec). Leaf size: 21

DSolve[(y[x]*Sin[x]+Cos[x]^2)-(Cos[x])*D[y[x],x]==0,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{2} (\sin (x)+(x+2 c_1) \sec (x)) \]