74.11.37 problem 49

Internal problem ID [16208]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.3, page 156
Problem number : 49
Date solved : Thursday, March 13, 2025 at 07:56:38 AM
CAS classification : [[_2nd_order, _missing_x]]

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

With initial conditions

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

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