32.2.34 problem 35

Internal problem ID [7751]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Further problems 24. page 1068
Problem number : 35
Date solved : Tuesday, September 30, 2025 at 05:04:33 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

With initial conditions

\begin{align*} y \left (1\right )&=1 \\ \end{align*}
Maple. Time used: 0.275 (sec). Leaf size: 13
ode:=x^2*diff(y(x),x) = y(x)^2-x*y(x)*diff(y(x),x); 
ic:=[y(1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = x \operatorname {LambertW}\left (\frac {{\mathrm e}}{x}\right ) \]
Mathematica. Time used: 0.937 (sec). Leaf size: 13
ode=x^2*D[y[x],x]==y[x]^2-x*y[x]*D[y[x],x]; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x W\left (\frac {e}{x}\right ) \end{align*}
Sympy. Time used: 0.288 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + x*y(x)*Derivative(y(x), x) - y(x)**2,0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x W\left (\frac {e}{x}\right ) \]