83.3.1 problem 1 (a)

Internal problem ID [21920]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter III. First order differential equations of the first degree. Ex. IV at page 38
Problem number : 1 (a)
Date solved : Thursday, October 02, 2025 at 08:09:40 PM
CAS classification : [_quadrature]

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