**Due March 18, 2005 (5 pm)**

This problem set will give you some experience with root finding
and/or least-squares fitting. You may do *either* question 1
*or* question 2 (see over; if you do both, you will get a maximum
of 2 points of extra credit).

- Consider two bodies of mass and separated by a
distance travelling in circular orbits around their mutual
center of mass. Take the angular momentum vector of the system to
be pointing in the direction. In a frame that corotates with
the orbital motion there are five locations (called the Lagrange
points) where the effective acceleration felt by a test particle
vanishes. The acceleration arises from the gravity due to and
plus the rotation of the system as a whole. If the masses are
at points on the axis (so ), then by
convention . The and
points lie off the axis and form equilateral triangles with the
points and . Conventionally, is taken to be in the
direction, in the direction.
- Write a program to explore this system by computing the
effective gravity (a vector) and potential (a scalar) at specific
grid points in the -plane. Use units such that the
gravitational constant . The program should take as
input the mass of both bodies and their separation. You may
``hardwire'' the grid dimensions into your code if you wish. The
output should be the potential and and components of the
acceleration at each grid point.
- Use your favorite plotting program to plot vectors (for the
effective acceleration) and contours (for the effective potential)
for the cases where , , and ,
, .
- Use a simple root solver to determine the locations of the
Lagrange points for both these cases, using your
*a priori*knowledge of their approximate locations (i.e., first do a search along the axis for the , , and points, then along the axis for the and points. Watch out for singularities!...).

- Write a program to explore this system by computing the
effective gravity (a vector) and potential (a scalar) at specific
grid points in the -plane. Use units such that the
gravitational constant . The program should take as
input the mass of both bodies and their separation. You may
``hardwire'' the grid dimensions into your code if you wish. The
output should be the potential and and components of the
acceleration at each grid point.
- Write a program to fit first a Lorentzian
1 2 http://www.astro.umd.edu/~dcr/Courses/ASTR415/ps3.dat

which is in the format , where is the frequency, is the line strength, and is the estimated error in each .- What values of and do you get for the
Lorentzian, and what values of and do you get for
the Gaussian? Also report the error estimates for the fit
parameters. Which model is a better fit to the data?
- Plot the data and the fits. Be sure to include the errorbars.

- What values of and do you get for the
Lorentzian, and what values of and do you get for
the Gaussian? Also report the error estimates for the fit
parameters. Which model is a better fit to the data?