The slope of a tangent is the derivative of the function.
You can try to find the derivative of cos x.