Slope of tangent

Question: If we know the formula for a function, can we find a formula for the slope of a tangent to the function at any point?
1. Use the red slider to move the point p on the curve. Note the x -coordinate of p and the slope m Can you find a formula for the slope? (Not sure: Look at the blue curve) 2. Set the black slider to 3 to make a cubic graph, y = x^3 Again, Can you find a formula for the slope? (Not sure: Look at the blue curve)