# Plotting the space-coordinate path of a projectile [duplicate]

h = .01; g = 9.8; x = 0; y = 0; V = 40
Vy = 40 Sin[40 °]
Vy[n_] := Vy[n - 1] - g*h
Vx[n_] := 40 Cos[40 °]
x[n_] := x[n - 1] + 40 Cos[40 °]*h
y[n_] := y[n - 1] + Vy[n - 1]*h
t == (V*2*Sin[40 °])/g
R == (V^2*Sin[2*40 °])/g
Ymax == Sin[40 °]^2*V^2/(2 g)
ParametricPlot[{y[n], x[n]}, {n, 0, 5}]


I'm trying to plot y[n] vs x[n] but keep getting an error message and Mathematica keeps crashing. I did use ParametricPlot, but get a "Recursion depth" error message. I am also unsure of what my start and end points for n should be.

• What is the error message and from what expression are you getting it? Add the answers to these questions to your question; don't answer me by posting a comment. – m_goldberg Mar 22 '15 at 3:04
• Y calls y[-1] which is undefined. It also calls Vy, which calls Vy[-1] which is also undefined. – Sjoerd C. de Vries Mar 25 '15 at 19:50

Your functions x and y appear to be only defined on integers, so you can only plot them over the integers. One way is to use ListPlot.
h = .01; g = 9.8; x = 0; y = 0; V = 40;