26.5.25 problem Exercise 11.27, page 97

Internal problem ID [6998]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 11, Bernoulli Equations
Problem number : Exercise 11.27, page 97
Date solved : Tuesday, September 30, 2025 at 04:08:14 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=2 \tan \left (x \right ) \sec \left (x \right )-y^{2} \sin \left (x \right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 25
ode:=diff(y(x),x) = 2*tan(x)*sec(x)-y(x)^2*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-2 c_1 \cos \left (x \right )^{2}+\sec \left (x \right )}{c_1 \cos \left (x \right )^{3}+1} \]
Mathematica. Time used: 0.492 (sec). Leaf size: 32
ode=D[y[x],x]==2*Tan[x]*Sec[x]-y[x]^2*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\sec (x) \left (-2 \cos ^3(x)+c_1\right )}{\cos ^3(x)+c_1}\\ y(x)&\to \sec (x) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**2*sin(x) + Derivative(y(x), x) - 2*tan(x)/cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(-y(x)**2 + 2/cos(x)**2)*sin(x) + Derivative(y(x), x) cannot be solved by the factorable group method