56.1.83 problem 82

Internal problem ID [8795]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 82
Date solved : Wednesday, March 05, 2025 at 06:49:27 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 30
ode:=diff(diff(z(t),t),t)+3*diff(z(t),t)+2*z(t) = 24*exp(-3*t)-24*exp(-4*t); 
dsolve(ode,z(t), singsol=all);
 
\[ z = \left (-{\mathrm e}^{-t} c_{1} -4 \,{\mathrm e}^{-3 t}+12 \,{\mathrm e}^{-2 t}+c_{2} \right ) {\mathrm e}^{-t} \]
Mathematica. Time used: 0.19 (sec). Leaf size: 34
ode=D[z[t],{t,2}]+3*D[z[t],t]+2*z[t]==24*(Exp[-3*t]-Exp[-4*t]); 
ic={}; 
DSolve[{ode,ic},z[t],t,IncludeSingularSolutions->True]
 
\[ z(t)\to e^{-4 t} \left (12 e^t+c_1 e^{2 t}+c_2 e^{3 t}-4\right ) \]
Sympy. Time used: 0.286 (sec). Leaf size: 26
from sympy import * 
t = symbols("t") 
z = Function("z") 
ode = Eq(2*z(t) + 3*Derivative(z(t), t) + Derivative(z(t), (t, 2)) - 24*exp(-3*t) + 24*exp(-4*t),0) 
ics = {} 
dsolve(ode,func=z(t),ics=ics)
 
\[ z{\left (t \right )} = \left (C_{1} + C_{2} e^{- t} + 12 e^{- 2 t} - 4 e^{- 3 t}\right ) e^{- t} \]