64.4.8 problem 8

Internal problem ID [13226]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.2 (Separable equations). Exercises page 47
Problem number : 8
Date solved : Monday, March 31, 2025 at 07:40:09 AM
CAS classification : [_linear]

\begin{align*} x +y-x y^{\prime }&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 10
ode:=x+y(x)-x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\ln \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.037 (sec). Leaf size: 12
ode=(x+y[x])- x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (\log (x)+c_1) \]
Sympy. Time used: 0.187 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*Derivative(y(x), x) + x + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} + \log {\left (x \right )}\right ) \]