63.12.2 problem 1(b)

Internal problem ID [13085]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 2, Second order linear equations. Section 2.4.2 Variation of parameters. Exercises page 124
Problem number : 1(b)
Date solved : Wednesday, March 05, 2025 at 09:16:58 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }-x&=t \,{\mathrm e}^{t} \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 25
ode:=diff(diff(x(t),t),t)-x(t) = t*exp(t); 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = c_{2} {\mathrm e}^{-t}+\frac {{\mathrm e}^{t} \left (t^{2}+4 c_{1} -t \right )}{4} \]
Mathematica. Time used: 0.042 (sec). Leaf size: 54
ode=D[x[t],{t,2}]-x[t]==t*Exp[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \frac {1}{4} e^{-t} \left (4 \int _1^t-\frac {1}{2} e^{2 K[1]} K[1]dK[1]+e^{2 t} \left (t^2+4 c_1\right )+4 c_2\right ) \]
Sympy. Time used: 0.115 (sec). Leaf size: 20
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t*exp(t) - x(t) + Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{2} e^{- t} + \left (C_{1} + \frac {t^{2}}{4} - \frac {t}{4}\right ) e^{t} \]