66.1.15 problem Problem 15

Internal problem ID [13783]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 15
Date solved : Wednesday, March 05, 2025 at 10:16:19 PM
CAS classification : [_separable]

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

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