In Section 2.3, we developed the Product Rule and studied how it is employed to differentiate a product of two functions. In particular, recall that if \(f\) and \(g\) are differentiable functions of \(x\text{,}\) then
\begin{equation*}
\frac{d}{dx} \left[ f(x) \cdot g(x) \right] = f(x) \cdot g'(x) + g(x) \cdot f'(x).
\end{equation*}
(a) For each of the following functions, use the Product Rule to find the function’s derivative. Be sure to label each derivative by name (e.g., the derivative of \(g(x)\) should be labeled \(g'(x)\)).
(i) If \(g(x) = x\sin(x)\text{,}\) then \(g'(x) =\)
(ii) If \(h(x) = xe^x\text{,}\) then \(h'(x) =\)
(iii) If \(p(x) = x\ln(x)\text{,}\) then \(p'(x) =\)
(iv.) If \(q(x) = x^2 \cos(x)\) , then \(q'(x) =\)
(v.) If \(r(x) = e^x \sin(x)\) , then \(r'(x) =\)
(b) Use your work in (a) to help you evaluate the following indefinite integrals. Use differentiation to check your work.
(i) \(\displaystyle \int xe^x + e^x \, dx =\)
(ii) \(\displaystyle \int e^x(\sin(x) + \cos(x)) \, dx =\)
(iii) \(\displaystyle \int 2x\cos(x) - x^2 \sin(x) \, dx -\)
(iv) \(\displaystyle \int x\cos(x) + \sin(x) \, dx =\)
(v) \(\displaystyle \int 1 + \ln(x) \, dx =\)
(c) Observe that the examples in (b) work nicely because of the derivatives you were asked to calculate in (a). Each integrand in (b) is precisely the result of differentiating one of the products of basic functions found in (a). To see what happens when an integrand is still a product but not necessarily the result of differentiating an elementary product, we consider how to evaluate
\begin{equation*}
\int x\cos(x) \, dx.
\end{equation*}
(i) First, observe that
\begin{equation*}
\frac{d}{dx} \left[ x\sin(x) \right] = x\cos(x) + \sin(x).
\end{equation*}
Integrating both sides indefinitely and using the fact that the integral of a sum is the sum of the integrals, we find that
\begin{equation*}
\int \left(\frac{d}{dx} \left[ x\sin(x) \right] \right) \, dx = \int x\cos(x) \, dx + \int \sin(x) \, dx.
\end{equation*}
In this last equation, evaluate the indefinite integral on the left side.
\(\int \left(\frac{d}{dx} \left[ x\sin(x) \right] \right) \, dx =\)
In that same equation, now evaluate the indefinite integral all the way to the right side.
\(\int \sin(x) \, dx =\)
(ii) Using your answers to the previous two parts, solve the resulting equation for the expression \(\int x \cos(x) \, dx\text{.}\)
\(\int x \cos(x) \, dx =\)