65.6.12 problem 12.1 (xii)

Internal problem ID [13682]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 12, Homogeneous second order linear equations. Exercises page 118
Problem number : 12.1 (xii)
Date solved : Wednesday, March 05, 2025 at 10:11:53 PM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

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

Maple. Time used: 0.014 (sec). Leaf size: 16
ode:=diff(diff(y(t),t),t)+diff(y(t),t)-2*y(t) = 0; 
ic:=y(0) = 4, D(y)(0) = -4; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {4 \left ({\mathrm e}^{3 t}+2\right ) {\mathrm e}^{-2 t}}{3} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 21
ode=D[y[t],{t,2}]+D[y[t],t]-2*y[t]==0; 
ic={y[0]==4,Derivative[1][y][0] ==-4}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {4}{3} e^{-2 t} \left (e^{3 t}+2\right ) \]
Sympy. Time used: 0.135 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*y(t) + Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 4, Subs(Derivative(y(t), t), t, 0): -4} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {4 e^{t}}{3} + \frac {8 e^{- 2 t}}{3} \]