47.2.24 problem 24

Internal problem ID [7440]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number : 24
Date solved : Wednesday, March 05, 2025 at 04:36:23 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

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