74.12.25 problem 25

Internal problem ID [16253]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.4, page 163
Problem number : 25
Date solved : Thursday, March 13, 2025 at 08:07:23 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+3 y^{\prime }+2 y&=\cos \left ({\mathrm e}^{t}\right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 21
ode:=diff(diff(y(t),t),t)+3*diff(y(t),t)+2*y(t) = cos(exp(t)); 
dsolve(ode,y(t), singsol=all);
 
\[ y = -\left (-c_{2} {\mathrm e}^{t}+\cos \left ({\mathrm e}^{t}\right )+c_{1} +1\right ) {\mathrm e}^{-2 t} \]
Mathematica. Time used: 0.1 (sec). Leaf size: 61
ode=D[y[t],{t,2}]+3*D[y[t],t]+2*y[t]==Cos[Exp[t]]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{-2 t} \left (\int _1^t-e^{2 K[1]} \cos \left (e^{K[1]}\right )dK[1]+e^t \int _1^te^{K[2]} \cos \left (e^{K[2]}\right )dK[2]+c_2 e^t+c_1\right ) \]
Sympy. Time used: 0.623 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(2*y(t) - cos(exp(t)) + 3*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (C_{1} + \left (C_{2} - \cos {\left (e^{t} \right )}\right ) e^{- t}\right ) e^{- t} \]