57.5.16 problem 3(d)

Internal problem ID [14371]
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 : 3(d)
Date solved : Thursday, October 02, 2025 at 09:34:11 AM
CAS classification : [[_linear, `class A`]]

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