76.2.5 problem 5

Internal problem ID [17270]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.2 (Linear equations: Method of integrating factors). Problems at page 54
Problem number : 5
Date solved : Monday, March 31, 2025 at 03:48:11 PM
CAS classification : [[_linear, `class A`]]

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

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