29.2.3 problem 3

Internal problem ID [7230]
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 : Friday, October 03, 2025 at 02:11:26 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:=sin(x)*diff(y(x),x) = ln(y(x))*y(x); 
ic:=[y(1/3*Pi) = exp(1)]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = {\mathrm e}^{\sqrt {3}\, \left (-\cot \left (x \right )+\csc \left (x \right )\right )} \]
Mathematica. Time used: 0.13 (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]
 
\begin{align*} y(x)&\to e^{e^{\text {arctanh}\left (\frac {1}{2}\right )-\text {arctanh}(\cos (x))}} \end{align*}
Sympy. Time used: 0.340 (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}}} \]