50.8.16 problem 2(h)

Internal problem ID [7932]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Problems for Review and Discovery. Page 53
Problem number : 2(h)
Date solved : Sunday, March 30, 2025 at 12:38:31 PM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 7
ode:=1/y(x)-x/y(x)^2*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 x \]
Mathematica. Time used: 0.035 (sec). Leaf size: 9
ode=1/y[x]-x/y[x]^2*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_1 x \]
Sympy. Time used: 0.108 (sec). Leaf size: 5
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*Derivative(y(x), x)/y(x)**2 + 1/y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x \]