40.5.2 problem 18

Internal problem ID [6667]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 9. Equations of first order and higher degree. Supplemetary problems. Page 65
Problem number : 18
Date solved : Sunday, March 30, 2025 at 11:15:38 AM
CAS classification : [_quadrature]

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

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