80.10.2 problem 25

Internal problem ID [21397]
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 11. Laplace transform. Excercise 11.7 at page 248
Problem number : 25
Date solved : Thursday, October 02, 2025 at 07:30:47 PM
CAS classification : [[_linear, `class A`]]

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

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=-1 \\ \end{align*}
Maple. Time used: 0.038 (sec). Leaf size: 7
ode:=diff(x(t),t)+x(t) = t; 
ic:=[x(0) = -1]; 
dsolve([ode,op(ic)],x(t),method='laplace');
 
\[ x = t -1 \]
Mathematica. Time used: 0.018 (sec). Leaf size: 8
ode=D[x[t],t]+x[t]==t; 
ic={x[0] ==-1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to t-1 \end{align*}
Sympy. Time used: 0.069 (sec). Leaf size: 5
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t + x(t) + Derivative(x(t), t),0) 
ics = {x(0): -1} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = t - 1 \]