# Represent the motion of a particle

I am trying to represent the motion of a particle along a given trajectory. So I defined the following functions

x[t_] := Cos[t]

y[t_] := Sin[t]

T[t_] := {x[t], y[t]}

Trajectory = ParametricPlot[T[t], {t, 0, 2*Pi}, ImageSize -> Large,AspectRatio -> 1];

P[t_] := Point[T[t]]

V[t_] = Arrow[{T[t], T[t] + {x'[t], y'[t]}}];


and so I give the command

Animate[Show[Trajectory, Graphics[V[t], P[t]]], {t, 0, 2*Pi}]


but unfortunately the final result is really stranger and moreover I do not see the point P in the motion but only the velocity vectors and the trajectory that strangely changes its size. So could someone help me, please?

• If you indend by 4spaces your code is shown (I edited your question accordingly) Nov 22, 2021 at 15:31
• Fix Show by adding PlotRange and wrapping V[t] and P[t] into a list: Show[Trajectory, Graphics[{V[t], P[t]}], PlotRange -> {{-2, 2}, {-2, 2}}]. Nov 22, 2021 at 15:36
• @UlrichNeumann Okay, thanks for the edit. Nov 22, 2021 at 15:36
• @Domen Okay, it works for a circumference but strangely it does not work for a parabol, e.g. try to put x[t_]:=t, y[t_]:=t^2. Nov 22, 2021 at 15:43
• @Domen E.g. see this x[t_] := t y[t_] := t^2 T[t_] := {x[t], y[t]} Trajectory = ParametricPlot[T[t], {t, 0, 5}, ImageSize -> Large, AspectRatio -> 1]; P[t_] := Point[T[t]] V[t_] = Arrow[{T[t], T[t] + {x'[t], y'[t]}}]; Animate[Show[Trajectory, Graphics[{V[t], P[t]}], PlotRange -> {{0, 25}, {0, 25}}], {t, 0, 5}] Nov 22, 2021 at 15:46

Trajectory =ParametricPlot[T[t], {t, 0, 2*Pi}, ImageSize -> Large,AspectRatio -> 1, PlotRange -> 1.5 {{-1, 1}, {-1, 1}}];