age = 65;
eqn1 = y'[t] == 47/1000*y[t] - 5300;
sol1 = y[t] /. NDSolve[{eqn1, y[age] == 100000}, y[t], {t, age, 110}][[1]];
data = Table[{t, sol1}, {t, age, 85}];
Plot[sol1, {t, age, 85},
Epilog -> {Red, AbsolutePointSize[3], Point[data]}]
However, this can be soved exactly using DSolve.
sol2[t_] = Simplify[y[t] /. DSolve[{eqn1, y[age] == 100000}, y[t], t][[1]]]
100000/47 (53 - 6 E^((47 (-65 + t))/1000))
Plot[sol2[t], {t, age, 85},
Epilog -> {Red, AbsolutePointSize[3], Point[data]}]
In TimeValue you have fixed the time value at zero. Note that for
TimeValue[s, i, 0] this is independent of the intest rate and as you
observed there is no change.
TimeValue[s, i, t]
(1 + i)^t s
TimeValue[s, i, 0]
s
Presumably you want a time slider in addition to the interest rate slider.
Manipulate[sol3[t_] := TimeValue[sol2[t], discountRate/100, t2];
Column[{
Grid[
Partition[
Partition[
Table[{t, NumberForm[sol3[t] // N, {8, 2}]},
{t, age, 85}],
7] // Transpose // Flatten,
6],
Frame -> All],
Plot[sol3[t], {t, age, 85},
PlotRange -> {75000, 200000},
ImageSize -> 288]
}],
{t2, 0, 20, 1,
Appearance -> {"Labeled"}},
{{discountRate, 1.6, "Discount Rate"}, .8, 3, .1, Appearance -> {"Labeled"}}]
Bob Hanlon