65.4.8 problem 9.1 (viii)

Internal problem ID [13738]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 9, First order linear equations and the integrating factor. Exercises page 86
Problem number : 9.1 (viii)
Date solved : Tuesday, January 28, 2025 at 06:00:20 AM
CAS classification : [_linear]

\begin{align*} x^{\prime }+\left (a +\frac {1}{t}\right ) x&=b \end{align*}

With initial conditions

\begin{align*} x \left (1\right )&=x_{0} \end{align*}

Solution by Maple

Time used: 0.030 (sec). Leaf size: 38

dsolve([diff(x(t),t)+(a+1/t)*x(t)=b,x(1) = x__0],x(t), singsol=all)
 
\[ x \left (t \right ) = \frac {\left (x_{0} a^{2}-a b +b \right ) {\mathrm e}^{-a \left (t -1\right )}+b \left (a t -1\right )}{t \,a^{2}} \]

Solution by Mathematica

Time used: 0.107 (sec). Leaf size: 44

DSolve[{D[x[t],t]+(a+1/t)*x[t]==b,{x[1]==x0}},x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to \frac {e^{-a t-1} \left (\int _1^tb e^{a K[1]+1} K[1]dK[1]+e^{a+1} \text {x0}\right )}{t} \]