29.28.10 problem 808

Internal problem ID [5391]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 28
Problem number : 808
Date solved : Sunday, March 30, 2025 at 08:04:24 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.002 (sec). Leaf size: 25
ode:=diff(y(x),x)^2+y(x)*diff(y(x),x) = x*(x+y(x)); 
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.05 (sec). Leaf size: 32
ode=(D[y[x],x])^2+y[x]*D[y[x],x]==x*(x+y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x^2}{2}+c_1 \\ y(x)\to -x+c_1 e^{-x}+1 \\ \end{align*}
Sympy. Time used: 0.188 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(x + y(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 ] \]