20.4.47 problem Problem 65

Internal problem ID [3682]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 65
Date solved : Tuesday, March 04, 2025 at 05:07:00 PM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

With initial conditions

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

Maple. Time used: 0.030 (sec). Leaf size: 10
ode:=1/y(x)*diff(y(x),x)-2/x*ln(y(x)) = 1/x*(1-2*ln(x)); 
ic:=y(1) = exp(1); 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y \left (x \right ) = x \,{\mathrm e}^{x^{2}} \]
Mathematica. Time used: 0.22 (sec). Leaf size: 12
ode=D[y[x],x]/y[x]-2/x*Log[y[x]]==1/x*(1-2*Log[x]); 
ic={y[1]==Exp[1]}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{x^2} x \]
Sympy. Time used: 0.837 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x)/y(x) - (1 - 2*log(x))/x - 2*log(y(x))/x,0) 
ics = {y(1): E} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x e^{x^{2}} \]