63.5.14 problem 3(b)

Internal problem ID [13009]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.4.1. Integrating factors. Exercises page 41
Problem number : 3(b)
Date solved : Wednesday, March 05, 2025 at 08:57:13 PM
CAS classification : [_separable]

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

With initial conditions

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

Maple. Time used: 0.019 (sec). Leaf size: 14
ode:=diff(x(t),t) = (a+b/t)*x(t); 
ic:=x(1) = 1; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x \left (t \right ) = t^{b} {\mathrm e}^{a \left (t -1\right )} \]
Mathematica. Time used: 0.033 (sec). Leaf size: 16
ode=D[x[t],t]==(a+b/t)*x[t]; 
ic={x[1]==1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to e^{a (t-1)} t^b \]
Sympy. Time used: 0.279 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
a = symbols("a") 
b = symbols("b") 
x = Function("x") 
ode = Eq(-(a + b/t)*x(t) + Derivative(x(t), t),0) 
ics = {x(1): 1} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = e^{- a} e^{a t + b \log {\left (t \right )}} \]