14.8.6 problem 6

Internal problem ID [2561]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.2.1 Linear equations with constant coefficients (complex roots). Excercises page 144
Problem number : 6
Date solved : Sunday, March 30, 2025 at 12:10:13 AM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }+5 y&=0 \end{align*}

With initial conditions

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

Maple. Time used: 0.044 (sec). Leaf size: 13
ode:=diff(diff(y(t),t),t)+2*diff(y(t),t)+5*y(t) = 0; 
ic:=y(0) = 0, D(y)(0) = 2; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = {\mathrm e}^{-t} \sin \left (2 t \right ) \]
Mathematica. Time used: 0.021 (sec). Leaf size: 15
ode=D[y[t],{t,2}]+2*D[y[t],t]+5*y[t]==0; 
ic={y[0]==0,Derivative[1][y][0] ==2}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-t} \sin (2 t) \]
Sympy. Time used: 0.180 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(5*y(t) + 2*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(t), t), t, 0): 2} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = e^{- t} \sin {\left (2 t \right )} \]