80.5.26 problem C 2

Internal problem ID [21247]
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 2
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&=4 t^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 23
ode:=diff(diff(x(t),t),t)-4*x(t) = 4*t^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = {\mathrm e}^{2 t} c_2 +{\mathrm e}^{-2 t} c_1 -t^{2}-\frac {1}{2} \]
Mathematica. Time used: 0.01 (sec). Leaf size: 30
ode=D[x[t],{t,2}]-4*x[t]==4*t^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -t^2+c_1 e^{2 t}+c_2 e^{-2 t}-\frac {1}{2} \end{align*}
Sympy. Time used: 0.051 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-4*t**2 - 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} - t^{2} - \frac {1}{2} \]