73.5.4 problem 6.2

Internal problem ID [15036]
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, March 13, 2025 at 05:30:51 AM
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.210 (sec). Leaf size: 18
ode:=diff(y(x),x) = 1+(y(x)-x)^2; 
ic:=y(0) = 1/4; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {x^{2}-4 x -1}{x -4} \]
Mathematica. Time used: 0.16 (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]
 
\[ y(x)\to \frac {x^2-4 x-1}{x-4} \]
Sympy. Time used: 0.265 (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} \]