65.4.7 problem 9.1 (vii)

Internal problem ID [13666]
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 (vii)
Date solved : Monday, March 31, 2025 at 08:07:10 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} x^{\prime }+5 x&=t \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=diff(x(t),t)+5*x(t) = t; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {t}{5}-\frac {1}{25}+{\mathrm e}^{-5 t} c_1 \]
Mathematica. Time used: 0.063 (sec). Leaf size: 30
ode=D[x[t],t]+5*x[t]==t; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to e^{-5 t} \left (\int _1^te^{5 K[1]} K[1]dK[1]+c_1\right ) \]
Sympy. Time used: 0.126 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t + 5*x(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} e^{- 5 t} + \frac {t}{5} - \frac {1}{25} \]