80.1.23 problem 24

Internal problem ID [21141]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 1. First order linear differential equations. Excercise 1.5 at page 13
Problem number : 24
Date solved : Thursday, October 02, 2025 at 07:09:51 PM
CAS classification : [_quadrature]

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