73.6.14 problem 7.5 (d)

Internal problem ID [15082]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 7. The exact form and general integrating fators. Additional exercises. page 141
Problem number : 7.5 (d)
Date solved : Monday, March 31, 2025 at 01:22:56 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.005 (sec). Leaf size: 108
ode:=1+(1-x*tan(y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \arctan \left (\frac {-\sqrt {-c_1^{2}+x^{2}+1}\, x +c_1}{x^{2}+1}, \frac {c_1 x +\sqrt {-c_1^{2}+x^{2}+1}}{x^{2}+1}\right ) \\ y &= \arctan \left (\frac {\sqrt {-c_1^{2}+x^{2}+1}\, x +c_1}{x^{2}+1}, \frac {c_1 x -\sqrt {-c_1^{2}+x^{2}+1}}{x^{2}+1}\right ) \\ \end{align*}
Mathematica. Time used: 0.108 (sec). Leaf size: 29
ode=1+(1-x*Tan[y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=\sec (y(x)) \int _1^{y(x)}-\cos (K[1])dK[1]+c_1 \sec (y(x)),y(x)\right ] \]
Sympy. Time used: 4.934 (sec). Leaf size: 46
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*tan(y(x)) + 1)*Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = 2 \operatorname {atan}{\left (\frac {\sqrt {- C_{1}^{2} + x^{2} + 1} - 1}{C_{1} - x} \right )}, \ y{\left (x \right )} = - 2 \operatorname {atan}{\left (\frac {\sqrt {- C_{1}^{2} + x^{2} + 1} + 1}{C_{1} - x} \right )}\right ] \]