14.11.11 problem 11

Internal problem ID [2604]
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 : 11
Date solved : Tuesday, March 04, 2025 at 02:30:33 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }-6 y&=\sin \left (t \right )+t \,{\mathrm e}^{2 t} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 45
ode:=diff(diff(y(t),t),t)+diff(y(t),t)-6*y(t) = sin(t)+t*exp(2*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {\left (\left (t^{2}-\frac {2}{5} t +10 c_1 +\frac {2}{25}\right ) {\mathrm e}^{5 t}+\frac {\left (-\cos \left (t \right )-7 \sin \left (t \right )\right ) {\mathrm e}^{3 t}}{5}+10 c_2 \right ) {\mathrm e}^{-3 t}}{10} \]
Mathematica. Time used: 0.164 (sec). Leaf size: 51
ode=D[y[t],{t,2}]+D[y[t],t]-6*y[t]==Sin[t]+t*Exp[2*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{250} \left (e^{2 t} \left (25 t^2-10 t+2\right )-35 \sin (t)-5 \cos (t)\right )+c_1 e^{-3 t}+c_2 e^{2 t} \]
Sympy. Time used: 0.241 (sec). Leaf size: 36
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t*exp(2*t) - 6*y(t) - sin(t) + Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{2} e^{- 3 t} + \left (C_{1} + \frac {t^{2}}{10} - \frac {t}{25}\right ) e^{2 t} - \frac {7 \sin {\left (t \right )}}{50} - \frac {\cos {\left (t \right )}}{50} \]