15.7.16 problem 16

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

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

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