72.8.7 problem 20

Internal problem ID [14700]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Review Exercises for chapter 1. page 136
Problem number : 20
Date solved : Monday, March 31, 2025 at 12:54:22 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }&=y+{\mathrm e}^{-t} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=diff(y(t),t) = y(t)+exp(-t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{-t}}{2}+{\mathrm e}^{t} c_1 \]
Mathematica. Time used: 0.058 (sec). Leaf size: 21
ode=D[y[t],t]==y[t]+Exp[-t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to -\frac {e^{-t}}{2}+c_1 e^t \]
Sympy. Time used: 0.121 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-y(t) + Derivative(y(t), t) - exp(-t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} e^{t} - \frac {e^{- t}}{2} \]