57.5.11 problem 2(e)

Internal problem ID [14366]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.4.1. Integrating factors. Exercises page 41
Problem number : 2(e)
Date solved : Thursday, October 02, 2025 at 09:34:04 AM
CAS classification : [[_linear, `class A`]]

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