73.5.25 problem 6.7 (m)

Internal problem ID [15065]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 6. Simplifying through simplifiction. Additional exercises. page 114
Problem number : 6.7 (m)
Date solved : Monday, March 31, 2025 at 01:20:49 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

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

Maple. Time used: 0.010 (sec). Leaf size: 29
ode:=diff(y(x),x) = (x-y(x)+3)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \left (x +2\right ) {\mathrm e}^{2 x}-x -4}{{\mathrm e}^{2 x} c_1 -1} \]
Mathematica. Time used: 0.184 (sec). Leaf size: 29
ode=D[y[x],x]==(x-y[x]+3)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x+\frac {1}{\frac {1}{2}+c_1 e^{2 x}}+2 \\ y(x)\to x+2 \\ \end{align*}
Sympy. Time used: 0.327 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x - y(x) + 3)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x + 4 C_{1} - x e^{2 x} - 2 e^{2 x}}{C_{1} - e^{2 x}} \]