38.1.15 problem 17

Internal problem ID [8176]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Exercises 1.1 at page 12
Problem number : 17
Date solved : Tuesday, September 30, 2025 at 05:18:09 PM
CAS classification : [_quadrature]

\begin{align*} \left (y-x \right ) y^{\prime }&=y-x \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 19
ode:=(y(x)-x)*diff(y(x),x) = y(x)-x; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= x \\ y &= x -c_1 \\ y &= x +c_1 \\ \end{align*}
Mathematica. Time used: 0.002 (sec). Leaf size: 14
ode=(y[x]-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.106 (sec). Leaf size: 5
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)
 
\[ y{\left (x \right )} = C_{1} + x \]