59.7.4 problem 14.1 (iv)

Internal problem ID [15049]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 14, Inhomogeneous second order linear equations. Exercises page 140
Problem number : 14.1 (iv)
Date solved : Thursday, October 02, 2025 at 10:02:23 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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