14.11.13 problem 13

Internal problem ID [2606]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 2. Second order differential equations. Section 2.5. Method of judicious guessing. Excercises page 164
Problem number : 13
Date solved : Tuesday, March 04, 2025 at 02:31:58 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.002 (sec). Leaf size: 19
ode:=diff(diff(y(t),t),t)-3*diff(y(t),t)+2*y(t) = exp(t)+exp(2*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = {\mathrm e}^{t} \left (\left (t +c_1 -1\right ) {\mathrm e}^{t}-t +c_2 \right ) \]
Mathematica. Time used: 0.034 (sec). Leaf size: 25
ode=D[y[t],{t,2}]-3*D[y[t],t]+2*y[t]==Exp[t]+Exp[2*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^t \left (-t+e^t (t-1+c_2)-1+c_1\right ) \]
Sympy. Time used: 0.209 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(2*y(t) - exp(2*t) - 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} - t + \left (C_{2} + t\right ) e^{t}\right ) e^{t} \]