59.3.6 problem 8.2

Internal problem ID [15005]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 8, Separable equations. Exercises page 72
Problem number : 8.2
Date solved : Thursday, October 02, 2025 at 09:58:26 AM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }+p x&=q \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=diff(x(t),t)+p*x(t) = q; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {q}{p}+{\mathrm e}^{-p t} c_1 \]
Mathematica. Time used: 0.026 (sec). Leaf size: 29
ode=D[x[t],t]+p*x[t]==q; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {q}{p}+c_1 e^{-p t}\\ x(t)&\to \frac {q}{p} \end{align*}
Sympy. Time used: 0.070 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
p = symbols("p") 
q = symbols("q") 
x = Function("x") 
ode = Eq(p*x(t) - q + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} e^{- p t} + \frac {q}{p} \]