65.3.3 problem 2 (C)

Internal problem ID [15640]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.1, page 40
Problem number : 2 (C)
Date solved : Thursday, October 02, 2025 at 10:21:34 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=1-y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=diff(y(x),x) = 1-y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1+{\mathrm e}^{-x} c_1 \]
Mathematica. Time used: 0.014 (sec). Leaf size: 20
ode=D[y[x],x]==1-y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 1+c_1 e^{-x}\\ y(x)&\to 1 \end{align*}
Sympy. Time used: 0.061 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + 1 \]