I have pasted my Mathematica code below. For some reason, the default value for h, or Δx, while set to 4.5 in the code, keeps displaying at -4 instead. I have been over and over this example, and I don't understand why this is happening. If someone would be willing to help me to understand what is going on here and how to fix it, I would really appreciate it.
Manipulate[
f[x_] = 2.195^x - 1;
Grid[{
{Row[{Style[
Text[" approximation of the derivative f'(x) : " <>
ToString[(f[a + h] - f[a])/h]], Green, 15]}]},
{Row[{Style[
Text[" derivative: f'(x) \[TildeTilde] " <>
ToString[D[f[x], x] /. x -> a]], Red, 15]}]},
{Plot[{f[x],
f[a] + (D[f[t], t] /. t -> a)*(x - a),
f[a] + ((f[a + h] - f[a])/h)*(x - a)},
{x, -0.5, 6.5},
PlotStyle -> {Blue, Red, Green},
PlotRange -> {{-0.5, 6.25}, {-50, 130}}, Axes -> True,
AxesOrigin -> {0, -50},
AxesLabel -> {"time (sec)", "distance (ft)"},
ImageSize -> 450,
Prolog -> {
{Line[{{a + h, f[a + h]}, {a, f[a + h]}}]},
{Line[{{a, f[a + h]}, {a, f[a]}}]},
{PointSize[.02], Blue, Point[{a, f[a]}]},
{Blue, Text["(x,f(x))", {a + .3, f[a] - 5}]},
{Text["Δx", {a + h/2, f[a + h] - 5}]},
{Text["f(x+Δx) - f(x)", {a + .6, f[a] - (f[a] - f[a + h])/2}]},
{PointSize[.02], Green, Point[{a + h, f[a + h]}]},
{Green, Text["(x+Δx,f(x+Δx))", {a + h - .4, f[a + h] + 7}]}}]}}],
{{a, 1, "x"}, 0, 6},
{{h, 4.5, "Δx"}, -a, 6 - a},
TrackedSymbols -> {a, a + h},
SaveDefinitions -> True]


{a, a + h}and not{a, h}? The former causes infinite re-evaluation (notice flashing cell bracket). – István Zachar Mar 16 at 8:39aandhbefore theManipulate? Did you tested it with a fresh kernel? Your problem is not reproducible, I goth = 4.5, as expected. – István Zachar Mar 16 at 8:44