15.4.12 problem 13

Internal problem ID [2925]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 8, page 34
Problem number : 13
Date solved : Sunday, March 30, 2025 at 12:56:32 AM
CAS classification : [_separable]

\begin{align*} \frac {2}{y}-\frac {y}{x^{2}}+\left (\frac {1}{x}-\frac {2 x}{y^{2}}\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 50
ode:=2/y(x)-y(x)/x^2+(1/x-2*x/y(x)^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {2}\, x \\ y &= -\sqrt {2}\, x \\ y &= -\frac {\left (c_1 +\sqrt {c_1^{2}-8}\right ) x}{2} \\ y &= \frac {\left (-c_1 +\sqrt {c_1^{2}-8}\right ) x}{2} \\ \end{align*}
Mathematica. Time used: 0.031 (sec). Leaf size: 55
ode=(2/y[x]-y[x]/x^2)+(1/x-2*x/y[x]^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {2} x \\ y(x)\to \sqrt {2} x \\ y(x)\to c_1 x \\ y(x)\to -\sqrt {2} x \\ y(x)\to \sqrt {2} x \\ \end{align*}
Sympy. Time used: 0.278 (sec). Leaf size: 5
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*x/y(x)**2 + 1/x)*Derivative(y(x), x) + 2/y(x) - y(x)/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x \]