68.5.43 problem 50

Internal problem ID [17294]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.3, page 49
Problem number : 50
Date solved : Thursday, October 02, 2025 at 02:01:03 PM
CAS classification : [[_linear, `class A`]]

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