85.15.18 problem 3 (c)

Internal problem ID [22543]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 47
Problem number : 3 (c)
Date solved : Thursday, October 02, 2025 at 08:49:30 PM
CAS classification : [_linear]

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