72.6.18 problem 8

Internal problem ID [19472]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 10 (Linear equations). Problems at page 82
Problem number : 8
Date solved : Thursday, October 02, 2025 at 04:29:46 PM
CAS classification : [_linear]

\begin{align*} y^{\prime } \sin \left (2 x \right )&=2 y+2 \cos \left (x \right ) \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(y(x),x)*sin(2*x) = 2*y(x)+2*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \tan \left (x \right )-\sec \left (x \right ) \]
Mathematica. Time used: 0.036 (sec). Leaf size: 15
ode=D[y[x],x]*Sin[2*x]==2*y[x]+2*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sec (x) (-1+c_1 \sin (x)) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) + sin(2*x)*Derivative(y(x), x) - 2*cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out