14.7.9 problem 9

Internal problem ID [2553]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.2. Linear equations with constant coefficients. Excercises page 140
Problem number : 9
Date solved : Tuesday, March 04, 2025 at 02:27:26 PM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

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

Maple. Time used: 0.008 (sec). Leaf size: 23
ode:=diff(diff(y(t),t),t)+5*diff(y(t),t)+6*y(t) = 0; 
ic:=y(0) = 1, D(y)(0) = v; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \left (3+v \right ) {\mathrm e}^{-2 t}+\left (-v -2\right ) {\mathrm e}^{-3 t} \]
Mathematica. Time used: 0.016 (sec). Leaf size: 23
ode=D[y[t],{t,2}]+5*D[y[t],t]+6*y[t]==0; 
ic={y[0]==1,Derivative[1][y][0] ==v}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-3 t} \left (e^t (v+3)-v-2\right ) \]
Sympy. Time used: 0.200 (sec). Leaf size: 19
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(6*y(t) + 5*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 1, Subs(Derivative(y(t), t), t, 0): v} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (v + \left (- v - 2\right ) e^{- t} + 3\right ) e^{- 2 t} \]