4.8 problem 9.1 (viii)

Internal problem ID [12002]

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).
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_linear]

\[ \boxed {x^{\prime }+\left (a +\frac {1}{t}\right ) x=b} \] With initial conditions \begin {align*} [x \left (1\right ) = x_{0}] \end {align*}

Solution by Maple

Time used: 0.031 (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.101 (sec). Leaf size: 48

DSolve[{x'[t]+(a+1/t)*x[t]==b,{x[1]==x0}},x[t],t,IncludeSingularSolutions -> True]
 

\[ x(t)\to \frac {e^{-a t} \left (e^a a^2 \text {x0}+b e^{a t} (a t-1)-(a-1) e^a b\right )}{a^2 t} \]