81.15.20 problem 19-21

Internal problem ID [21728]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 19. Change of variables. Page 483
Problem number : 19-21
Date solved : Thursday, October 02, 2025 at 08:01:27 PM
CAS classification : [[_2nd_order, _missing_y], [_2nd_order, _reducible, _mu_y_y1]]

\begin{align*} \left (x +2\right ) y^{\prime \prime }+{y^{\prime }}^{2}&=1 \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 31
ode:=(x+2)*diff(diff(y(x),x),x)+diff(y(x),x)^2 = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x -i c_1 \ln \left (i c_1 +x +2\right )+i c_1 \ln \left (-i c_1 +x +2\right )+c_2 \]
Mathematica. Time used: 3.021 (sec). Leaf size: 26
ode=(x+2)*D[y[x],{x,2}]+D[y[x],x]^2==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -2 e^{c_1} \arctan \left (e^{-c_1} (x+2)\right )+x+c_2 \end{align*}
Sympy. Time used: 0.901 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 2)*Derivative(y(x), (x, 2)) + Derivative(y(x), x)**2 - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} \log {\left (- C_{2} + x + 2 \right )} - C_{2} \log {\left (C_{2} + x + 2 \right )} + x \]