I have all the equations down to manipulate the tangent line on the graph... but the tangent line is too long, what would be the best way to shorten it?
f[x_] = Sin[x];
Plot[f[x], {x, -2 Pi, 2 Pi}]
tangent[f_, a_, x_] := f'[a] (x - a) + f[a]
Manipulate[Plot[{f[x], tangent[f, p, x]}, {x, -2 Pi, 2 Pi}, Epilog -> {Red, PointSize[.015], Point@{p, Sin[p]}}], {p, -Pi, Pi}]

