80.1.25 problem 29

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

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