75.8.5 problem 203

Internal problem ID [16750]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 8. First order not solved for the derivative. Exercises page 67
Problem number : 203
Date solved : Monday, March 31, 2025 at 03:15:49 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.003 (sec). Leaf size: 23
ode:=diff(y(x),x)^2-(y(x)+2*x)*diff(y(x),x)+x^2+x*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {x^{2}}{2}+c_1 \\ y &= -x -1+{\mathrm e}^{x} c_1 \\ \end{align*}
Mathematica. Time used: 0.062 (sec). Leaf size: 42
ode=D[y[x],x]^2-(2*x+y[x])*D[y[x],x]+x^2+x*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x^2}{2}+c_1 \\ y(x)\to e^x \left (\int _1^xe^{-K[1]} K[1]dK[1]+c_1\right ) \\ \end{align*}
Sympy. Time used: 0.201 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + x*y(x) - (2*x + y(x))*Derivative(y(x), x) + Derivative(y(x), x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = C_{1} + \frac {x^{2}}{2}, \ y{\left (x \right )} = C_{1} e^{x} - x - 1\right ] \]