8.5.14 problem 14

Internal problem ID [742]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.6, Substitution methods and exact equations. Page 74
Problem number : 14
Date solved : Tuesday, March 04, 2025 at 11:39:16 AM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

\begin{align*} x +y y^{\prime }&=\sqrt {x^{2}+y^{2}} \end{align*}

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