58.5.14 problem 14

Internal problem ID [14608]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.3 (Linear equations). Exercises page 56
Problem number : 14
Date solved : Thursday, October 02, 2025 at 09:44:08 AM
CAS classification : [_linear]

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