29.30.9 problem 868

Internal problem ID [5449]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 30
Problem number : 868
Date solved : Tuesday, March 04, 2025 at 09:39:46 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

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