56.1.24 problem 25

Internal problem ID [8736]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 25
Date solved : Sunday, March 30, 2025 at 01:29:12 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.002 (sec). Leaf size: 11
ode:=(x+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -x \\ y &= c_1 \\ \end{align*}
Mathematica. Time used: 0.003 (sec). Leaf size: 14
ode=(x+y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x \\ y(x)\to c_1 \\ \end{align*}
Sympy. Time used: 0.160 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x, \ y{\left (x \right )} = C_{1}\right ] \]