26.1.14 problem First order with homogeneous Coefficients. Exercise 7.15, page 61

Internal problem ID [6919]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 7
Problem number : First order with homogeneous Coefficients. Exercise 7.15, page 61
Date solved : Tuesday, September 30, 2025 at 04:05:41 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

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

With initial conditions

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