79.2.6 problem (g)

Internal problem ID [21088]
Book : Ordinary Differential Equations. By Wolfgang Walter. Graduate texts in Mathematics. Springer. NY. QA372.W224 1998
Section : Chapter 1. First order equations: Some integrable cases. Excercises XIII at page 24
Problem number : (g)
Date solved : Thursday, October 02, 2025 at 07:07:11 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

\begin{align*} y^{\prime }&=\left (x -y+3\right )^{2} \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 31
ode:=diff(y(x),x) = (x-y(x)+3)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-x -2\right ) {\mathrm e}^{2 x}+c_1 \left (x +4\right )}{-{\mathrm e}^{2 x}+c_1} \]
Mathematica. Time used: 0.108 (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.201 (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}} \]