29.8.5 problem 210

Internal problem ID [4810]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 210
Date solved : Sunday, March 30, 2025 at 03:59:21 AM
CAS classification : [[_1st_order, _with_linear_symmetries]]

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

Maple. Time used: 0.230 (sec). Leaf size: 117
ode:=x*diff(y(x),x)+x+tan(x+y(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \arctan \left (\frac {c_1}{x}, \frac {\sqrt {-c_1^{2}+x^{2}}}{x}\right )-x \\ y &= \arctan \left (\frac {c_1}{x}, -\frac {\sqrt {-c_1^{2}+x^{2}}}{x}\right )-x \\ y &= \arctan \left (-\frac {c_1}{x}, \frac {\sqrt {-c_1^{2}+x^{2}}}{x}\right )-x \\ y &= \arctan \left (-\frac {c_1}{x}, -\frac {\sqrt {-c_1^{2}+x^{2}}}{x}\right )-x \\ \end{align*}
Mathematica. Time used: 4.879 (sec). Leaf size: 16
ode=x D[y[x],x]+x+Tan[x+y[x]]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x+\arcsin \left (\frac {c_1}{x}\right ) \]
Sympy. Time used: 3.741 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + x + tan(x + y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x + \operatorname {asin}{\left (\frac {C_{1}}{x} \right )}, \ y{\left (x \right )} = - x - \operatorname {asin}{\left (\frac {C_{1}}{x} \right )} + \pi \right ] \]