35.8.2 problem 2

Internal problem ID [6209]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number : 2
Date solved : Sunday, March 30, 2025 at 10:43:08 AM
CAS classification : [_separable]

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

Maple. Time used: 0.042 (sec). Leaf size: 31
ode:=x*ln(y(x))*diff(y(x),x)-y(x)*ln(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= {\mathrm e}^{\sqrt {\ln \left (x \right )^{2}+2 c_1}} \\ y &= {\mathrm e}^{-\sqrt {\ln \left (x \right )^{2}+2 c_1}} \\ \end{align*}
Mathematica. Time used: 0.786 (sec). Leaf size: 60
ode=x*Log[y[x]]*D[y[x],x]-y[x]*Log[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to e^{-\sqrt {\log ^2(x)+2 c_1}} \\ y(x)\to e^{\sqrt {\log ^2(x)+2 c_1}} \\ y(x)\to 0 \\ y(x)\to e^{2 i \text {Interval}[\{0,\pi \}]} \\ \end{align*}
Sympy. Time used: 1.530 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*log(y(x))*Derivative(y(x), x) - y(x)*log(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = e^{- \sqrt {C_{1} + \log {\left (x \right )}^{2}}}, \ y{\left (x \right )} = e^{\sqrt {C_{1} + \log {\left (x \right )}^{2}}}\right ] \]