44.1.15 problem 17

Internal problem ID [6890]
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 : Wednesday, March 05, 2025 at 02:49:30 AM
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.099 (sec). Leaf size: 67
ode=(y[x]-1)*D[y[x],x]==y[x]-x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {\arctan \left (\frac {\frac {2 (x-1)}{y(x)-1}-1}{\sqrt {3}}\right )}{\sqrt {3}}=\frac {1}{2} \log \left (\frac {x^2+y(x)^2-(x+1) y(x)-x+1}{(x-1)^2}\right )+\log (x-1)+c_1,y(x)\right ] \]
Sympy. Time used: 0.252 (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 \]