Homework: Derivatives Intro¶
GOALS:
- Explain the definition of the derivative
- Use the definition of the derivative to approximate slopes of tangent lines
- Use the power rule to evaluate derivatives of polynomials
- Use a functions derivative to explain where original function is increasing, decreasing, is maximized, or is minimized.
[1]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import sympy as sy
PROBLEM I: Definition¶
Below are two definitions of the derivative. In your own words and with pictures, explain what these mean.
\[\lim_{h \to 0} \frac{f(x + h) - f(x)}{h} \quad \text{and} \quad \lim_{x_2 \to x_1} \frac{f(x_2) - f(x_1)}{x_2 - x_1}\]
[ ]:
[ ]:
[ ]:
[ ]:
PROBLEM II: Tables¶
Using the definition of the derivative below, fill in the tables for appropriate functions at \(a = 0\).
- \(f(x) = .5x^3 - 1\)
- \(g(x) = \sin(x)\)
- \(h(x) = \frac{1}{x}\)
\[\lim_{h \to 0} \frac{f(a + h) - f(a)}{h}\]
[ ]:
[ ]:
[ ]:
[ ]:
PROBLEM III: Equations of Tangent Lines¶
For each of the following functions, use the power rule to find the derivative \(f'(x)\) and write equation for the line tangent to the graph at \(x = a\). Draw a picture of \(f\) and the tangent line to verify you are correct.
- \(f(x) = 2x^3 + 4x^2 - 5x - 3\) at \(x = -1\).
- \(f(x) = x^2 + \frac{4}{x^3} - 10\) at \(x = 8\)
[ ]:
[ ]:
[ ]:
[ ]:
PROBLEM IV: Shapes of curves¶
Given the plots of the two derivatives below, identify the following:
- Intervals where \(f\) is increasing
- Intervals where \(f\) is decreasing
- Any local maximum or minimum values in \(f\)
|4ad465c0f9284909888917407330c55a||7d83e607e53c4dd49aa31e4cc4ff8b71|
[ ]:
[ ]:
[ ]:
[ ]:
[ ]:
[ ]:
[105]:
# x = np.linspace(-3, 3, 1000)
# def f(x): return (x + 2)*(x + 1)**2 * x * (x - 1)
# # # set the x-spine (see below for more info on `set_position`)
# fig, ax = plt.subplots()
# ax.spines['left'].set_position('zero')
# # turn off the right spine/ticks
# ax.spines['right'].set_color('none')
# ax.yaxis.tick_left()
# # set the y-spine
# ax.spines['bottom'].set_position('zero')
# # turn off the top spine/ticks
# ax.spines['top'].set_color('none')
# ax.xaxis.tick_bottom()
# ax.plot(x, f(x), label = "f'(x)")
# plt.ylim(-5, 5)
# plt.axvline(color = 'black')
# plt.axhline(color = 'black')
# plt.legend(fontsize = 20, frameon = False)
# plt.savefig('images/15_p1.png')
[106]:
# def f(x): return (x - 2)*(x + 2)*(x + 1)*(x - 1)*x**2
# # # set the x-spine (see below for more info on `set_position`)
# fig, ax = plt.subplots()
# ax.spines['left'].set_position('zero')
# # turn off the right spine/ticks
# ax.spines['right'].set_color('none')
# ax.yaxis.tick_left()
# # set the y-spine
# ax.spines['bottom'].set_position('zero')
# # turn off the top spine/ticks
# ax.spines['top'].set_color('none')
# ax.xaxis.tick_bottom()
# def f(x): return (x - 2)*(x + 2)*(x + 1)*(x - 1)*x**2
# ax.plot(x, f(x), label = "f'(x)")
# plt.ylim(-8, 5)
# plt.axvline(color = 'black')
# plt.axhline(color = 'black')
# plt.legend(fontsize = 20, frameon = False)
# plt.savefig('images/15_p2.png')
