Find the Slope of a Tangent of a Quadratic (Numerically)
Any point along a continuous curve has a slope. You can find an approximation of the slope by taking two points very close together along the curve and using the equation:
$$ \text{slope} = m = \frac{y_2-y_1}{x_2-x_1} $$
The closer the points are together the better the approximation of the tangential slope, in general. However, you can get too close when you go beyond the precision of the computer, and your results will be inaccurate.
Write a program that determines the slope of the tangent to a quadratic for any given value of x.
Test using the quadratic function:
$$ f(x) = x^2 $$
Complete the table below.