29.15.32 problem 440

Internal problem ID [5038]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 15
Problem number : 440
Date solved : Sunday, March 30, 2025 at 06:31:30 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.075 (sec). Leaf size: 16
ode:=(x+y(x))*diff(y(x),x)+tan(y(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ x +\cot \left (y\right )+y-c_1 \csc \left (y\right ) = 0 \]
Mathematica. Time used: 0.182 (sec). Leaf size: 29
ode=(x+y[x])D[y[x],x]+Tan[y[x]]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[x=\csc (y(x)) (-y(x) \sin (y(x))-\cos (y(x)))+c_1 \csc (y(x)),y(x)] \]
Sympy. Time used: 9.464 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + y(x))*Derivative(y(x), x) + tan(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x \sin {\left (y{\left (x \right )} \right )} + y{\left (x \right )} \sin {\left (y{\left (x \right )} \right )} + \cos {\left (y{\left (x \right )} \right )} = 0 \]