Question: Error, invalid input: with expects

hi friends

After this cods i see very error

 > restart;

read(orbit.sav ): whit(plots):
ax := -G*Mz*x/(x^2+y^2)^(3/2);
ay := -G*Mz*y/(x^2+y^2)^(3/2);
i := 'i'; j := i+1;
for k from 0 to 3 do
x := 7*10^6; Vx := 0;
y := 0; Vy := 9000;
dt := evalf(1/2^k);
for i from 0 to 328 do
X[i] := evalf(x); Y[i] := evalf(y);
for n to 40*2^k do
x := evalf((1/2)*ax*dt^2+Vx*dt+x); y := evalf((1/2)*ay*dt^2+Vy*dt+y);
Vx := evalf(ax*dt+Vx); Vy := evalf(ay*dt+Vy)
od;
if i mod 41= 0 then
dX[k, i] := X[i]-XS[j]; dY[k, i] := Y[i]-YS[j]
fi
od;
p[k] := plot([seq([(X[i]-XS[j])*(1/1000), (Y[i]-YS[j])*(1/1000)], i = 0 .. 328)], color = green) end do;
p1 := display({seq(p[k], k = 0 .. 3)}, thickness = 3)
SI := [seq(41*i, i = 0 .. 8)]
p2 := plot({seq([seq([(1/1000)*dX[k, i], (1/1000)*dY[k, i]], k = 0 .. 1), [0, 0]], i = SI)}, color = black)
display({p1, p2}, scaling = constrained, labels = ['dx', 'dy'])
display({p1, p2}, view = [-.1 .. .5, -.4 .. .2], scaling = constrained, labels = ['dx', 'dy'])

can you help me Please?

Thank you

 

 

 

Please Wait...