Docsity

ASTR615 Fall 2007 Problem Set #3: Root Finding and Least-Squares Fitting - Prof. Derek Cha, Assignments of Astronomy

Toggle sidebar
bg1
ASTR615 Fall 2007 Problem Set #3
Due October 18, 2007
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. If you do both, you will get a maximum of 2
points of extra credit.
1. Consider two bodies of mass m1and m2, separated by a distance d, and travelling in
circular orbits around their mutual center of mass. Take the angular momentum vector
of the system to be pointing in the +zdirection. 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 m1and m2plus the rotation of the frame as a whole. If the masses are at points
x1< x2on the xaxis (so d=x2−x1), then by convention L3< x1< L1< x2< L2.
The L4and L5points lie off the xaxis and form equilateral triangles with the points x1
and x2. Conventionally, L4is taken to be in the +ydirection, L5in the −ydirection.
(a) Write a program to explore this system by computing the effective gravity (a
vector) and potential (a scalar) at specific grid points in the xy-plane. Use units
such that the gravitational constant G≡1. 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 x
and ycomponents of the acceleration at each grid point.
(b) Use your favorite plotting program to plot vectors (for the effective acceleration)
and contours (for the effective potential) for the cases where m1= 3, m2= 2,
d= 1 and m1= 100, m2= 1, d= 5.
(c) 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 y= 0 axis for the L1,L2, and L3points, then along
the x= (x1+x2)/2 axis for the L4and L5points. Watch out for singularities!...).
1
pf2

Partial preview of the text

Download ASTR615 Fall 2007 Problem Set #3: Root Finding and Least-Squares Fitting - Prof. Derek Cha and more Assignments Astronomy in PDF only on Docsity!

ASTR615 Fall 2007 Problem Set

Due October 18, 2007

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. If you do both, you will get a maximum of 2 points of extra credit.

  1. Consider two bodies of mass m 1 and m 2 , separated by a distance d, and travelling in circular orbits around their mutual center of mass. Take the angular momentum vector of the system to be pointing in the +z 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 m 1 and m 2 plus the rotation of the frame as a whole. If the masses are at points x 1 < x 2 on the x axis (so d = x 2 − x 1 ), then by convention L 3 < x 1 < L 1 < x 2 < L 2. The L 4 and L 5 points lie off the x axis and form equilateral triangles with the points x 1 and x 2. Conventionally, L 4 is taken to be in the +y direction, L 5 in the −y direction.

(a) Write a program to explore this system by computing the effective gravity (a vector) and potential (a scalar) at specific grid points in the xy-plane. Use units such that the gravitational constant G ≡ 1. 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 x and y components of the acceleration at each grid point. (b) Use your favorite plotting program to plot vectors (for the effective acceleration) and contours (for the effective potential) for the cases where m 1 = 3, m 2 = 2, d = 1 and m 1 = 100, m 2 = 1, d = 5. (c) 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 y = 0 axis for the L 1 , L 2 , and L 3 points, then along the x = (x 1 + x 2 )/2 axis for the L 4 and L 5 points. Watch out for singularities!...).

  1. Write a program to fit first a Lorentzian

φ(ν) =

π

αL (ν − ν 0 )^2 + α^2 L

and then a Gaussian φ(ν) =

αD

ln 2 π

e−(ln 2)(ν−ν^0 )

(^2) /α (^2) D (2)

to the data in

http://www.astro.umd.edu/~dcr/Courses/ASTR615/ps3.dat

which is in the format ν φ e, where ν is the frequency, φ is the line strength, and e is the estimated error in each φ.

(a) What values of αL and ν 0 do you get for the Lorentzian, and what values of αD and ν 0 do you get for the Gaussian? Also report the error estimates for the fit parameters. Which model is a better fit to the data? (b) Plot the data and the fits. Be sure to include the errorbars.