35.2.3 problem 3

Internal problem ID [6095]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 2. Separable equations. page 398
Problem number : 3
Date solved : Sunday, March 30, 2025 at 10:38:28 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (\frac {\pi }{3}\right )&={\mathrm e} \end{align*}

Maple. Time used: 0.328 (sec). Leaf size: 16
ode:=diff(y(x),x)*sin(x) = y(x)*ln(y(x)); 
ic:=y(1/3*Pi) = exp(1); 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = {\mathrm e}^{\sqrt {3}\, \left (-\cot \left (x \right )+\csc \left (x \right )\right )} \]
Mathematica. Time used: 0.226 (sec). Leaf size: 19
ode=D[y[x],x]*Sin[x]==y[x]*Log[y[x]]; 
ic={y[Pi/3]==Exp[1]}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{e^{\text {arctanh}\left (\frac {1}{2}\right )-\text {arctanh}(\cos (x))}} \]
Sympy. Time used: 0.539 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)*log(y(x)) + sin(x)*Derivative(y(x), x),0) 
ics = {y(pi/3): E} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{- \frac {\sqrt {3} i \sqrt {\cos {\left (x \right )} - 1}}{\sqrt {\cos {\left (x \right )} + 1}}} \]