57.12.7 problem 2

Internal problem ID [14450]
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 : 2
Date solved : Thursday, October 02, 2025 at 09:37:25 AM
CAS classification : [[_2nd_order, _missing_y]]

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