83.8.25 problem 26

Internal problem ID [19080]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter II. Equations of first order and first degree. Misc examples on chapter II at page 25
Problem number : 26
Date solved : Monday, March 31, 2025 at 06:46:52 PM
CAS classification : [`y=_G(x,y')`]

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

Maple. Time used: 0.019 (sec). Leaf size: 19
ode:=diff(y(x),x)+1/x*tan(y(x)) = 1/x^2*tan(y(x))*sin(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\arcsin \left (\frac {2 x}{c_1 \,x^{2}-1}\right ) \]
Mathematica. Time used: 0.629 (sec). Leaf size: 23
ode=D[y[x],x]+Tan[y[x]]/x==1/x^2*Tan[y[x]]*Sin[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \csc ^{-1}\left (\frac {1}{2 x}+c_1 x\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 2.980 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + tan(y(x))/x - sin(y(x))*tan(y(x))/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \pi - \operatorname {asin}{\left (\frac {2 x}{C_{1} x^{2} + 1} \right )}, \ y{\left (x \right )} = \operatorname {asin}{\left (\frac {2 x}{C_{1} x^{2} + 1} \right )}\right ] \]