30.6.13 problem 14

Internal problem ID [7548]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problems. page 79
Problem number : 14
Date solved : Tuesday, September 30, 2025 at 04:47:09 PM
CAS classification : [_linear]

\begin{align*} x^{\prime }-\frac {x}{t -1}&=t^{2}+2 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 22
ode:=diff(x(t),t)-x(t)/(t-1) = t^2+2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \left (\frac {t^{2}}{2}+t +3 \ln \left (t -1\right )+c_1 \right ) \left (t -1\right ) \]
Mathematica. Time used: 0.019 (sec). Leaf size: 30
ode=D[x[t],t]- x[t]/(t-1) ==t^2+2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{2} (t-1) \left (t^2+2 t+6 \log (t-1)-3+2 c_1\right ) \end{align*}
Sympy. Time used: 0.185 (sec). Leaf size: 34
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t**2 + Derivative(x(t), t) - 2 - x(t)/(t - 1),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} t - C_{1} + \frac {t^{3}}{2} + \frac {t^{2}}{2} + 3 t \log {\left (t - 1 \right )} - t - 3 \log {\left (t - 1 \right )} \]