72.7.23 problem 23

Internal problem ID [14693]
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. Exercises section 1.9 page 133
Problem number : 23
Date solved : Monday, March 31, 2025 at 12:53:42 PM
CAS classification : [[_linear, `class A`]]

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

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