89.33.2 problem 2

Internal problem ID [24986]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 17. Special Equations of order Two. Exercises at page 251
Problem number : 2
Date solved : Thursday, October 02, 2025 at 11:45:57 PM
CAS classification : [[_2nd_order, _missing_y]]

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

With initial conditions

\begin{align*} y \left (2\right )&=5 \\ y^{\prime }\left (2\right )&=-4 \\ \end{align*}
Maple. Time used: 0.038 (sec). Leaf size: 24
ode:=x^2*diff(diff(y(x),x),x)+diff(y(x),x)^2-2*x*diff(y(x),x) = 0; 
ic:=[y(2) = 5, D(y)(2) = -4]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {x^{2}}{2}+3 x +9 \ln \left (-3+x \right )-3-9 i \pi \]
Mathematica. Time used: 0.27 (sec). Leaf size: 28
ode=x^2*D[y[x],{x,2}]+D[y[x],x]^2-2*x*D[y[x],x]==0; 
ic={y[2]==5,Derivative[1][y][2] ==-4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^2}{2}+3 x+9 \log (x-3)-9 i \pi -3 \end{align*}
Sympy. Time used: 0.626 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - 2*x*Derivative(y(x), x) + Derivative(y(x), x)**2,0) 
ics = {y(2): 5, Subs(Derivative(y(x), x), x, 2): -4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{2}}{2} + 3 x + 9 \log {\left (x - 3 \right )} - 3 - 9 i \pi \]