14.16.2 problem 16

Internal problem ID [2672]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.9, The method of Laplace transform. Excercises page 232
Problem number : 16
Date solved : Sunday, March 30, 2025 at 12:13:46 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using Laplace method With initial conditions

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

Maple. Time used: 0.104 (sec). Leaf size: 23
ode:=2*diff(diff(y(t),t),t)+diff(y(t),t)-y(t) = exp(3*t); 
ic:=y(0) = 2, D(y)(0) = 0; 
dsolve([ode,ic],y(t),method='laplace');
 
\[ y = \frac {3 \,{\mathrm e}^{-t}}{4}+\frac {{\mathrm e}^{3 t}}{20}+\frac {6 \,{\mathrm e}^{\frac {t}{2}}}{5} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 30
ode=2*D[y[t],{t,2}]+D[y[t],t]-y[t]==Exp[3*t]; 
ic={y[0]==2,Derivative[1][y][0] ==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{20} e^{-t} \left (24 e^{3 t/2}+e^{4 t}+15\right ) \]
Sympy. Time used: 0.175 (sec). Leaf size: 24
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-y(t) - exp(3*t) + Derivative(y(t), t) + 2*Derivative(y(t), (t, 2)),0) 
ics = {y(0): 2, Subs(Derivative(y(t), t), t, 0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {6 e^{\frac {t}{2}}}{5} + \frac {e^{3 t}}{20} + \frac {3 e^{- t}}{4} \]