28.1.80 problem 83

Internal problem ID [4386]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 83
Date solved : Sunday, March 30, 2025 at 03:11:24 AM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

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