67.5.4 problem 6.2

Internal problem ID [16402]
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.2
Date solved : Thursday, October 02, 2025 at 01:28:32 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

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

With initial conditions

\begin{align*} y \left (0\right )&={\frac {1}{4}} \\ \end{align*}
Maple. Time used: 0.242 (sec). Leaf size: 18
ode:=diff(y(x),x) = 1+(y(x)-x)^2; 
ic:=[y(0) = 1/4]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {x^{2}-4 x -1}{x -4} \]
Mathematica. Time used: 0.102 (sec). Leaf size: 19
ode=D[y[x],x]==1+(y[x]-x)^2; 
ic={y[0]==1/4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^2-4 x-1}{x-4} \end{align*}
Sympy. Time used: 0.163 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(-x + y(x))**2 + Derivative(y(x), x) - 1,0) 
ics = {y(0): 1/4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x^{2} - 4 x - 1}{x - 4} \]