Computation of the Lagrangian points
Consider an object moving in the plane and subject to a set of forces. Our goal in this application consists in determining the equilibrium positions of this object.
- Question :
- Write the code to represent the following kinds of forces :
- an elastic force (with zero natural length)
- a centrifugal force
fc:[x y]→[k(x−x0) k(y−y0)]
- a gravitational force
fg:[x y]→[−k⋅((x−x0)2+(y−y0)2)3/2x−x0 −k⋅((x−x0)2+(y−y0)2)3/2y−y0]
Remarks:
- It is strongly recommended to use functional programming techniques to represent the forces and their Jacobian matrices.
- For each of these cases, it should be possible to parameterize the force by a constant k symbolizing its intensity, as well as a central point (x0,y0) from which the force is issued.
- Question :
- Use the Newton-Raphson method to obtain the equilibrium points in the following case :
- Two gravitational forces with respective coefficients 1 (resp. 0.01) originating from [0,0] (resp. [1,0]);
- And a centrifugal force centered on the barycenter of the two masses, with coefficient 1.
As a means of verification, and with the conditions above, at U=[1.5,0], one gets the following values for the total force and its Jacobian :
f(U)=[1.00565457 0] and df(U)=[1.75259259 0.0.0.6237037].