15.2.1 problem 1

Internal problem ID [2871]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 6, page 25
Problem number : 1
Date solved : Tuesday, March 04, 2025 at 02:52:43 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 10
ode:=x+y(x) = x*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\ln \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.025 (sec). Leaf size: 12
ode=x+y[x]==x*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (\log (x)+c_1) \]
Sympy. Time used: 0.163 (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 ) \]