73.2.8 problem 3.4 h

Internal problem ID [14960]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 3. Some basics about First order equations. Additional exercises. page 63
Problem number : 3.4 h
Date solved : Monday, March 31, 2025 at 01:08:57 PM
CAS classification : [_separable]

\begin{align*} \left (y-2\right ) y^{\prime }&=x -3 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 39
ode:=(y(x)-2)*diff(y(x),x) = x-3; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= 2-\sqrt {x^{2}+2 c_1 -6 x +4} \\ y &= 2+\sqrt {x^{2}+2 c_1 -6 x +4} \\ \end{align*}
Mathematica. Time used: 0.112 (sec). Leaf size: 47
ode=(y[x]-2)*D[y[x],x]==x-3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2-\sqrt {x^2-6 x+4+2 c_1} \\ y(x)\to 2+\sqrt {x^2-6 x+4+2 c_1} \\ \end{align*}
Sympy. Time used: 0.364 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + (y(x) - 2)*Derivative(y(x), x) + 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = 2 - \sqrt {C_{1} + x^{2} - 6 x}, \ y{\left (x \right )} = \sqrt {C_{1} + x^{2} - 6 x} + 2\right ] \]