80.1.13 problem 13

Internal problem ID [21131]
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 : 13
Date solved : Thursday, October 02, 2025 at 07:09:40 PM
CAS classification : [[_linear, `class A`]]

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