57.12.3 problem 1(c)

Internal problem ID [14446]
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(c)
Date solved : Thursday, October 02, 2025 at 09:37:22 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }-x&=\frac {1}{t} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 32
ode:=diff(diff(x(t),t),t)-x(t) = 1/t; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {\operatorname {Ei}_{1}\left (-t \right ) {\mathrm e}^{-t}}{2}+{\mathrm e}^{-t} c_1 +\left (-\frac {\operatorname {Ei}_{1}\left (t \right )}{2}+c_2 \right ) {\mathrm e}^{t} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 42
ode=D[x[t],{t,2}]-x[t]==1/t; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{2} e^{-t} \left (e^{2 t} \operatorname {ExpIntegralEi}(-t)-\operatorname {ExpIntegralEi}(t)+2 \left (c_1 e^{2 t}+c_2\right )\right ) \end{align*}
Sympy. Time used: 0.341 (sec). Leaf size: 27
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-x(t) + Derivative(x(t), (t, 2)) - 1/t,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (C_{1} - \frac {\operatorname {Ei}{\left (t \right )}}{2}\right ) e^{- t} + \left (C_{2} + \frac {\operatorname {Ei}{\left (t e^{i \pi } \right )}}{2}\right ) e^{t} \]