19.2.10 problem 10

Internal problem ID [3539]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.6, page 50
Problem number : 10
Date solved : Sunday, March 30, 2025 at 01:46:40 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=diff(y(x),x) = sin(x)*(y(x)*sec(x)-2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \cos \left (x \right )-\frac {\sec \left (x \right )}{2}+c_1 \sec \left (x \right ) \]
Mathematica. Time used: 0.038 (sec). Leaf size: 20
ode=D[y[x],x]==Sin[x]*(y[x]*Sec[x]-2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \sec (x) (\cos (2 x)+2 c_1) \]
Sympy. Time used: 0.899 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-y(x)/cos(x) + 2)*sin(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}}{\cos {\left (x \right )}} + \cos {\left (x \right )} \]