50.24.2 problem 1(b)

Internal problem ID [8168]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 7. Laplace Transforms. Section 7.5 The Unit Step and Impulse Functions. Page 303
Problem number : 1(b)
Date solved : Sunday, March 30, 2025 at 12:47:13 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+y^{\prime }-6 y&=t \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=0\\ y^{\prime }\left (0\right )&=0 \end{align*}

Maple. Time used: 0.097 (sec). Leaf size: 21
ode:=diff(diff(y(t),t),t)+diff(y(t),t)-6*y(t) = t; 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = -\frac {t}{6}-\frac {{\mathrm e}^{-3 t}}{45}+\frac {{\mathrm e}^{2 t}}{20}-\frac {1}{36} \]
Mathematica. Time used: 0.016 (sec). Leaf size: 28
ode=D[y[t],{t,2}]+D[y[t],t]-6*y[t]==t; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{180} \left (-30 t-4 e^{-3 t}+9 e^{2 t}-5\right ) \]
Sympy. Time used: 0.191 (sec). Leaf size: 24
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t - 6*y(t) + Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = - \frac {t}{6} + \frac {e^{2 t}}{20} - \frac {1}{36} - \frac {e^{- 3 t}}{45} \]