deriv: Product Rule for Derivatives

Exercise template for computing the derivative (numeric answer) of a product function with factors of type xa and exp(b * x) at a given point c, with randomly-drawn a, b, and c.

Name:
deriv
Type:
Related:
Preview:

What is the derivative of \(f(x) = x^{7} e^{3.9 x}\), evaluated at \(x = 0.51\)?

Using the product rule for \(f(x) = g(x) \cdot h(x)\), where \(g(x) := x^{7}\) and \(h(x) := e^{3.9 x}\), we obtain \[ \begin{aligned} f'(x) &= [g(x) \cdot h(x)]' = g'(x) \cdot h(x) + g(x) \cdot h'(x) \\ &= 7 x^{7 - 1} \cdot e^{3.9 x} + x^{7} \cdot e^{3.9 x} \cdot 3.9 \\ &= e^{3.9 x} \cdot(7 x^6 + 3.9 x^{7}) \\ &= e^{3.9 x} \cdot x^6 \cdot (7 + 3.9 x). \end{aligned} \] Evaluated at \(x = 0.51\), the answer is \[ e^{3.9 \cdot 0.51} \cdot 0.51^6 \cdot (7 + 3.9 \cdot 0.51) = 1.155964. \] Thus, rounded to two digits we have \(f'(0.51) = 1.16\).

What is the derivative of \(f(x) = x^{5} e^{3.1 x}\), evaluated at \(x = 0.72\)?

Using the product rule for \(f(x) = g(x) \cdot h(x)\), where \(g(x) := x^{5}\) and \(h(x) := e^{3.1 x}\), we obtain \[ \begin{aligned} f'(x) &= [g(x) \cdot h(x)]' = g'(x) \cdot h(x) + g(x) \cdot h'(x) \\ &= 5 x^{5 - 1} \cdot e^{3.1 x} + x^{5} \cdot e^{3.1 x} \cdot 3.1 \\ &= e^{3.1 x} \cdot(5 x^4 + 3.1 x^{5}) \\ &= e^{3.1 x} \cdot x^4 \cdot (5 + 3.1 x). \end{aligned} \] Evaluated at \(x = 0.72\), the answer is \[ e^{3.1 \cdot 0.72} \cdot 0.72^4 \cdot (5 + 3.1 \cdot 0.72) = 18.110635. \] Thus, rounded to two digits we have \(f'(0.72) = 18.11\).

What is the derivative of \(f(x) = x^{3} e^{4 x}\), evaluated at \(x = 0.56\)?

Using the product rule for \(f(x) = g(x) \cdot h(x)\), where \(g(x) := x^{3}\) and \(h(x) := e^{4 x}\), we obtain \[ \begin{aligned} f'(x) &= [g(x) \cdot h(x)]' = g'(x) \cdot h(x) + g(x) \cdot h'(x) \\ &= 3 x^{3 - 1} \cdot e^{4 x} + x^{3} \cdot e^{4 x} \cdot 4 \\ &= e^{4 x} \cdot(3 x^2 + 4 x^{3}) \\ &= e^{4 x} \cdot x^2 \cdot (3 + 4 x). \end{aligned} \] Evaluated at \(x = 0.56\), the answer is \[ e^{4 \cdot 0.56} \cdot 0.56^2 \cdot (3 + 4 \cdot 0.56) = 15.435723. \] Thus, rounded to two digits we have \(f'(0.56) = 15.44\).

Description:
Computing the first derivative of a product function with two factors and randomly-drawn parameters, using the product rule.
Solution feedback:
Yes
Randomization:
Random numbers
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
No
Other supplements:
No
Template:
Raw: (1 random version)
PDF:
deriv-Rmd-pdf
deriv-Rnw-pdf
HTML:
deriv-Rmd-html
deriv-Rnw-html

(Note that the HTML output contains mathematical equations in MathML, rendered by MathJax using ‘mathjax = TRUE’. Instead it is also possible to use ‘converter = “pandoc-mathjax”’ so that LaTeX equations are rendered by MathJax directly.)

Demo code:

library("exams")

set.seed(403)
exams2html("deriv.Rmd", mathjax = TRUE)
set.seed(403)
exams2pdf("deriv.Rmd")

set.seed(403)
exams2html("deriv.Rnw", mathjax = TRUE)
set.seed(403)
exams2pdf("deriv.Rnw")