80.5.42 problem C 18

Internal problem ID [21263]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 5. Second order equations. Excercise 5.9 at page 119
Problem number : C 18
Date solved : Thursday, October 02, 2025 at 07:27:27 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }-3 x^{\prime }+2 x&=3 \,{\mathrm e}^{t} t \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=diff(diff(x(t),t),t)-3*diff(x(t),t)+2*x(t) = 3*exp(t)*t; 
dsolve(ode,x(t), singsol=all);
 
\[ x = {\mathrm e}^{2 t} c_1 +\frac {\left (-3 t^{2}+2 c_2 -6 t \right ) {\mathrm e}^{t}}{2} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 34
ode=D[x[t],{t,2}]-3*D[x[t],t]+2*x[t]==3*t*Exp[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{2} e^t \left (-3 \left (t^2+2 t+2\right )+2 c_2 e^t+2 c_1\right ) \end{align*}
Sympy. Time used: 0.128 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-3*t*exp(t) + 2*x(t) - 3*Derivative(x(t), t) + Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (C_{1} + C_{2} e^{t} - \frac {3 t^{2}}{2} - 3 t\right ) e^{t} \]