52.6.6 problem 26

Internal problem ID [8341]
Book : DIFFERENTIAL EQUATIONS with Boundary Value Problems. DENNIS G. ZILL, WARREN S. WRIGHT, MICHAEL R. CULLEN. Brooks/Cole. Boston, MA. 2013. 8th edition.
Section : CHAPTER 7 THE LAPLACE TRANSFORM. 7.3.1 TRANSLATION ON THE s-AXIS. Page 297
Problem number : 26
Date solved : Wednesday, March 05, 2025 at 05:35:28 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

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