67.3.44 problem 4.8 (c)

Internal problem ID [16365]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 4. SEPARABLE FIRST ORDER EQUATIONS. Additional exercises. page 90
Problem number : 4.8 (c)
Date solved : Thursday, October 02, 2025 at 01:22:39 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (0\right )&=-1 \\ \end{align*}
Maple. Time used: 0.014 (sec). Leaf size: 5
ode:=diff(y(x),x) = 2*x-1+2*x*y(x)-y(x); 
ic:=[y(0) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -1 \]
Mathematica. Time used: 0.001 (sec). Leaf size: 6
ode=D[y[x],x]==2*x-1+2*x*y[x]-y[x]; 
ic={y[0]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -1 \end{align*}
Sympy. Time used: 0.166 (sec). Leaf size: 5
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x) - 2*x + y(x) + Derivative(y(x), x) + 1,0) 
ics = {y(0): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = -1 \]