# Manipulate formula and several value on the Plot

I want to show the numerical results of (universal) gravitation.

However, how to give the value in the control bar?

G = 6.67259*10^(-11);
Manipulate[
Show[Plot[G*(M*m)/R^2, {R, 0, 1},
PlotRange -> {{0, 1.2}, {0, 2*10^(-8)}}],
Graphics[{Red, PointSize[Large], Point[{r, G*(M*m)/r^2}]}]], {
{M, 5}, 1, 10, Appearance -> "Labeled"}, {{m, 1}, 1, 10,
Appearance -> "Labeled"}, {{r, 0.3}, 0.1, 1,
Appearance -> "Labeled"}, Text@Style["F=", Black],
TrackedSymbols :> {M, m, r}]


Clear["Global*"]

G = 6.67259*10^(-11);

Manipulate[
F = G*(M*m)/r^2;
Show[Plot[G*(M*m)/R^2, {R, 0, 1},
PlotRange -> {{0, 1.2}, {0, 2*10^(-8)}}],
Graphics[{Red, PointSize[Large],
Tooltip[Point[#], #] &[{r, G*(M*m)/r^2}]}]],
{{M, 5}, 1, 10, 0.1, Appearance -> "Labeled"},
{{m, 1}, 1, 10, 0.01, Appearance -> "Labeled"},
{{r, 0.3}, 0.1, 1, 0.01, Appearance -> "Labeled"},
Text@Style[StringForm["F = ", Dynamic[F]], Black],
TrackedSymbols :> {M, m, r}]


• Thanks! How to add physical units? Such as 0.3(metre) 1(kg) 3.7×10^-9(N) Commented May 2, 2021 at 15:49
• Use Quantity`. If after reading and applying the documentation you have issues, post a new question with the details. The use of quantities has nothing to do with the original issue of this post. Commented May 2, 2021 at 16:24