For different values of time & force in At formula, I have a problem with the first case, which requires the first At, and I can not fix it. Also, in the table, how can I automatically enter values? I want to say that I want a table from 1 to n with At,time,forc

```
m = 1266.5 ;
k = 50 ;
Pt = ( {
{0, 0},
{.2, 1000},
{.4, 0},
{.6, -1000},
{.8, 0}
} );
ListLinePlot(Pt);
(Omega) = N(Sqrt((k*1000)/m), 5);
Round(T = (2*N(Pi, 5))/(Omega), 0.1);
(CapitalDelta)t = Round(T/10, 0.1)
time = NestList(# + (CapitalDelta)t &, Part(Pt, 1, 1),
Round(FixedPoint((#) &, (Part(Pt, 5, 1)/(CapitalDelta)t))))
forc = Table(p1 = Interpolation(Pt, InterpolationOrder -> 1);
P1 = p1(time((i))), {i, 1, Length@time - 1})
At = Table(
At((i - 1)) +
1/(Omega)*(time((i)) - (forc((i)) - forc((i - 1)))/(
time((i)) - time((i - 1)))*
time((i - 1)))*(Sin((Omega)*time((i))) -
Sin((Omega)*time((i - 1)))) +
1/(Omega)^2*(forc((i)) - forc((i - 1)))/(
time((i)) -
time((i - 1)))*(Cos((Omega)*time((i))) -
Cos((Omega)*
time((i - 1))) + (Omega)*(time((i))*Sin((Omega)*time((i))) -
time((i - 1))*Sin((Omega)*time((i - 1)))))
, {i, 1, Length@time - 1})
data = {{{Subscript(t, i), s}, {Subscript(p, i), N}}, {Part(time, 1),
Part(forc, 1)}, {Part(time, 2), Part(forc, 2)}, {Part(time, 3),
Part(forc, 3)}, {Part(time, 4), Part(forc, 4)}, {Part(time, 5),
Part(forc, 5)}, {Part(time, 6), Part(forc, 6)}, {Part(time, 7),
Part(forc, 7)}, {Part(time, 8), Part(forc, 8)}};
Grid(data, Alignment -> Center, Spacings -> {2, 1}, Frame -> All,
ItemStyle -> "Text", Background -> {{Gray, None}, {LightGray, None}})
```