72.16.20 problem 21

Internal problem ID [14837]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 4. Forcing and Resonance. Section 4.1 page 399
Problem number : 21
Date solved : Thursday, March 13, 2025 at 04:21:02 AM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

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

Maple. Time used: 0.018 (sec). Leaf size: 16
ode:=diff(diff(y(t),t),t)-5*diff(y(t),t)+4*y(t) = 5; 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = -\frac {5 \,{\mathrm e}^{t}}{3}+\frac {5 \,{\mathrm e}^{4 t}}{12}+\frac {5}{4} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 21
ode=D[y[t],{t,2}]-5*D[y[t],t]+4*y[t]==5; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {5}{12} \left (-4 e^t+e^{4 t}+3\right ) \]
Sympy. Time used: 0.176 (sec). Leaf size: 20
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(4*y(t) - 5*Derivative(y(t), t) + Derivative(y(t), (t, 2)) - 5,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 {5 e^{4 t}}{12} - \frac {5 e^{t}}{3} + \frac {5}{4} \]