23.1.217 problem 213

Internal problem ID [4824]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 213
Date solved : Tuesday, September 30, 2025 at 08:43:06 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: 0.112 (sec). Leaf size: 72
ode=x*D[y[x],x]+x+Tan[x+y[x]]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x(\cos (K[1]+y(x)) K[1]+\sin (K[1]+y(x)))dK[1]+\int _1^{y(x)}\left (x \cos (x+K[2])-\int _1^x(\cos (K[1]+K[2])-K[1] \sin (K[1]+K[2]))dK[1]\right )dK[2]=c_1,y(x)\right ] \]
Sympy. Time used: 2.059 (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 ] \]