29.2.5 problem 5

Internal problem ID [7232]
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 : 5
Date solved : Tuesday, September 30, 2025 at 04:25:56 PM
CAS classification : [_quadrature]

\begin{align*} x y y^{\prime }-x y&=y \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=1 \\ \end{align*}
Maple. Time used: 0.043 (sec). Leaf size: 8
ode:=x*y(x)*diff(y(x),x)-x*y(x) = y(x); 
ic:=[y(1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = x +\ln \left (x \right ) \]
Mathematica. Time used: 0.003 (sec). Leaf size: 9
ode=x*y[x]*D[y[x],x]-x*y[x]==y[x]; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x+\log (x) \end{align*}
Sympy. Time used: 0.169 (sec). Leaf size: 7
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)*Derivative(y(x), x) - x*y(x) - y(x),0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x + \log {\left (x \right )} \]