72.6.15 problem 23

Internal problem ID [14661]
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.8 page 121
Problem number : 23
Date solved : Thursday, March 13, 2025 at 04:13:03 AM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.002 (sec). Leaf size: 21
ode:=diff(y(t),t)-3*y(t) = 2*t-exp(4*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = -\frac {2 t}{3}-\frac {2}{9}-{\mathrm e}^{4 t}+c_{1} {\mathrm e}^{3 t} \]
Mathematica. Time used: 0.254 (sec). Leaf size: 38
ode=D[y[t],t]-3*y[t]==2*t-Exp[4*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{3 t} \left (\int _1^t\left (2 e^{-3 K[1]} K[1]-e^{K[1]}\right )dK[1]+c_1\right ) \]
Sympy. Time used: 0.149 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*t - 3*y(t) + exp(4*t) + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} e^{3 t} - \frac {2 t}{3} - e^{4 t} - \frac {2}{9} \]