28.1.65 problem 66

Internal problem ID [4371]
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 : 66
Date solved : Monday, January 27, 2025 at 09:09:25 AM
CAS classification : [_linear]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 23

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

Solution by Mathematica

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

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