A Gravitational Optimization Problem

Consider a collection of fixed particles of mass 1 at prescribed positions (shown as black locators). Another particle of mass 1 starts at (0,0) with velocity 1 in a direction θ (counterclockwise from the axis). It then travels according to Newton's laws, subject to an inverse-square force of magnitude from each of the fixed masses. What is the shortest time in which the moving particle can be made to reach a prescribed target (the red locator)? This Demonstration lets you vary the initial direction to thereby find an approximate value of the optimal angle and minimum time by trial and error.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The trajectory is calculated numerically and the motion stops as soon as the moving particle hits the target or one of the fixed masses, or if the prescribed time limit is exceeded. You can change the positions of the fixed particles as well as the target by dragging the mouse or by choosing one of the predefined configurations. It is also possible to add fixed particles by ⌘-clicking or Alt-clicking, or to remove them by holding the shift key.
The default grid configuration has fixed masses at positions (2,-1), (2,0), (2,1), (3,-1), (3,0), (3,1), and the target at position (4,1); this problem appeared in Appendix D of [1]. The optimal solution (shown in the first snapshot) is approximately θ≈-0.27 with the final time t≈1.9; this fact can be verified by a numerical minimization procedure.
[1] F. Bornemann, D. Laurie, S. Wagon, and J. Waldvogel, The SIAM 100-Digit Challenge: A Study in High-Accuracy Numerical Computing, Philadelphia: Society for Industrial and Applied Mathematics, 2004.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+