15.8.31 problem 32

Internal problem ID [3034]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 32
Date solved : Sunday, March 30, 2025 at 01:11:57 AM
CAS classification : [`y=_G(x,y')`]

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

Maple
ode:=sec(y(x))^2*diff(y(x),x) = tan(y(x))+2*x*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 10.426 (sec). Leaf size: 64
ode=Sec[y[x]]^2*D[y[x],x]==Tan[y[x]]+2*x*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \arctan \left (e^x \left (x^2+2 c_1\right )\right ) \\ y(x)\to -\frac {1}{2} \pi e^{-x} \sqrt {e^{2 x}} \\ y(x)\to \frac {1}{2} \pi e^{-x} \sqrt {e^{2 x}} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*exp(x) - tan(y(x)) + Derivative(y(x), x)/cos(y(x))**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(2*x*exp(x) + tan(y(x)))*cos(y(x))**2 + Derivative(y(x), x) cannot be solved by the factorable group method