71.4.3 problem 3

Internal problem ID [14296]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.2, page 53
Problem number : 3
Date solved : Wednesday, March 05, 2025 at 10:43:22 PM
CAS classification : [_separable]

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

Maple. Time used: 0.024 (sec). Leaf size: 25
ode:=diff(y(x),x) = 1/x/y(x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {2 \ln \left (x \right )+c_{1}} \\ y &= -\sqrt {2 \ln \left (x \right )+c_{1}} \\ \end{align*}
Mathematica. Time used: 0.057 (sec). Leaf size: 40
ode=D[y[x],x]==1/(x*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {2} \sqrt {\log (x)+c_1} \\ y(x)\to \sqrt {2} \sqrt {\log (x)+c_1} \\ \end{align*}
Sympy. Time used: 0.244 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1/(x*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1} + 2 \log {\left (x \right )}}, \ y{\left (x \right )} = \sqrt {C_{1} + 2 \log {\left (x \right )}}\right ] \]