15.8.14 problem 14

Internal problem ID [3017]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 14
Date solved : Sunday, March 30, 2025 at 01:09:10 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

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

Maple. Time used: 1.121 (sec). Leaf size: 25
ode:=diff(y(x),x)+y(x)*ln(y(x))*tan(x) = 2*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\frac {\cos \left (x \right )}{\sin \left (x \right )-1}\right )^{2 \cos \left (x \right )} {\mathrm e}^{\cos \left (x \right ) c_1} \]
Mathematica. Time used: 2.029 (sec). Leaf size: 17
ode=D[y[x],x]+y[x]*Log[y[x]]*Tan[x]==2*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 \cos (x) \left (\coth ^{-1}(\sin (x))+c_1\right )} \]
Sympy. Time used: 2.735 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*log(y(x))*tan(x) - 2*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{- \left (- C_{1} + \log {\left (\sin {\left (x \right )} - 1 \right )} - \log {\left (\sin {\left (x \right )} + 1 \right )}\right ) \cos {\left (x \right )}} \]