80.5.25 problem C 1

Internal problem ID [21246]
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 1
Date solved : Thursday, October 02, 2025 at 07:27:18 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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