24.1.16 problem 4(a)

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

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.077 (sec). Leaf size: 20

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