64.3.6 problem 7

Internal problem ID [13206]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.1 (Exact differential equations and integrating factors). Exercises page 37
Problem number : 7
Date solved : Monday, March 31, 2025 at 07:37:32 AM
CAS classification : [_exact, [_Abel, `2nd type`, `class A`]]

\begin{align*} y \sec \left (x \right )^{2}+\sec \left (x \right ) \tan \left (x \right )+\left (\tan \left (x \right )+2 y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 61
ode:=y(x)*sec(x)^2+sec(x)*tan(x)+(tan(x)+2*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\tan \left (x \right )}{2}-\frac {\sqrt {-4 \cos \left (x \right )^{2} c_1 +\sin \left (x \right )^{2}-4 \cos \left (x \right )}\, \sec \left (x \right )}{2} \\ y &= -\frac {\tan \left (x \right )}{2}+\frac {\sqrt {-4 \cos \left (x \right )^{2} c_1 +\sin \left (x \right )^{2}-4 \cos \left (x \right )}\, \sec \left (x \right )}{2} \\ \end{align*}
Mathematica. Time used: 1.034 (sec). Leaf size: 101
ode=(y[x]*Sec[x]^2+Sec[x]*Tan[x])+(Tan[x]+2*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{4} \left (-2 \tan (x)-\sqrt {2} \sqrt {\sec ^2(x)} \sqrt {-8 \cos (x)+(-1+4 c_1) \cos (2 x)+1+4 c_1}\right ) \\ y(x)\to \frac {1}{4} \left (-2 \tan (x)+\sqrt {\sec ^2(x)} \sqrt {-16 \cos (x)+(-2+8 c_1) \cos (2 x)+2+8 c_1}\right ) \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*y(x) + tan(x))*Derivative(y(x), x) + y(x)/cos(x)**2 + tan(x)/cos(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out