Find a formula for the derivative of \(h(t) = 3^{t^2 + 2t}\sec^4(t)\text{.}\)
We first observe that \(h\) is the product of two functions: \(h(t) = a(t) \cdot b(t)\text{,}\) where \(a(t) = 3^{t^2 + 2t}\) and \(b(t) = \sec^4(t)\text{.}\) We will need to use the product rule to differentiate \(h\text{.}\) And because \(a\) and \(b\) are composite functions, we will also need the chain rule. We therefore begin by computing \(a'(t)\) and \(b'(t)\text{.}\)
Writing \(a(t) = f(g(t)) = 3^{t^2 + 2t}\) and finding the derivatives of \(f\) and \(g\) with respect to \(t\text{,}\) we have
\(f(t) = 3^t\text{,}\) 

\(g(t) = t^2 + 2t\text{,}\) 
\(f'(t) = 3^t \ln(3)\text{,}\) 

\(g'(t) = 2t+2\text{,}\) 
\(f'(g(t)) = 3^{t^2 + 2t}\ln(3)\text{.}\) 


Thus by the chain rule, it follows that
\begin{equation*}
a'(t) = f'(g(t))g'(t) = 3^{t^2 + 2t}\ln(3) (2t+2)\text{.}
\end{equation*}
Turning next to the function \(b\text{,}\) we write \(b(t) = r(s(t)) = \sec^4(t)\) and find the derivatives of \(r\) and \(s\) with respect to \(t\text{.}\)
\(r(t) = t^4\text{,}\) 

\(s(t) = \sec(t)\text{,}\) 
\(r'(t) = 4t^3\text{,}\) 

\(s'(t) = \sec(t)\tan(t)\text{,}\) 
\(r'(s(t)) = 4\sec^3(t)\text{.}\) 


By the chain rule,
\begin{gather*}
b'(t) = r'(s(t))s'(t) \\
= 4\sec^3(t)\sec(t)\tan(t) \\
= 4 \sec^4(t) \tan(t).
\end{gather*}
Now we are finally ready to compute the derivative of the function \(h\text{.}\) Recalling that \(h(t) = 3^{t^2 + 2t}\sec^4(t)\text{,}\) by the product rule we have
\begin{equation*}
h'(t) = \frac{d}{dt}\left[3^{t^2 + 2t}\right]\sec^4(t)+3^{t^2 + 2t} \frac{d}{dt}\left[\sec^4(t)\right]\text{.}
\end{equation*}
From our work above with \(a\) and \(b\text{,}\) we know the derivatives of \(3^{t^2 + 2t}\) and \(\sec^4(t)\text{.}\) Therefore
\begin{equation*}
h'(t) = 3^{t^2 + 2t}\ln(3) (2t+2)\sec^4(t) + 3^{t^2 + 2t} 4\sec^4(t) \tan(t)\text{.}
\end{equation*}
The above calculation may seem tedious. However, by breaking the function down into small parts and calculating derivatives of those parts separately, we are able to accurately calculate the derivative of the entire function.