29.32.15 problem 949

Internal problem ID [5527]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 32
Problem number : 949
Date solved : Tuesday, March 04, 2025 at 09:51:18 PM
CAS classification : [_quadrature]

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

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