This set practises the two halves of modelling a galaxy: the potential that a mass distribution makes, and the orbits of stars in it. Problem 1 uses orbits in a central potential (Lecture 5): the integrals of motion, the radial equation and the effective potential. Problem 2 uses potential–density pairs (Lecture 4), where the notes work through the same disc. The problems follow MIT's Problem Set 2, in our own words and in MIT's order. MIT publishes no solutions for the problem sets of this course, so the hints and the solutions here are our own.
A few things to know about the source. The sheet is one printed page, cited below as "p. 1". The notes are cited by their printed page and equation number. The sheet writes the potential as a capital and its reference radius as ; the notes write a small and . This page keeps the sheet's letters. For the angle of the star around the centre it uses the notes' . The sheet asks you to hand in your computer code; here you may use any tool that solves differential equations, and our own numbers were computed with Python's SciPy. The sheet recommends a ready-made integrator over one written from scratch, and so do we, but you should know what it does at each step.
Some choices are ours, each marked where it appears:
- in Problem 1, the split of MIT's single task into four parts, the starting point on the axis, the units ( and ), the time between plotted points, and the radius that splits the orbit into an inner and an outer half;
- in Problem 2, the numbers of part (C);
- the points: MIT says only that Problem 1 counts three times as much as Problem 2, so we give 30 and 10, and the split of each problem's points between its parts is ours.
Some boxes are our additions, each marked where it appears: all the boxes of Problem 1 (the sheet asks only for plots and a comment), the epicycle frequency in Problem 2(A), the angular derivative in Problem 2(B), and the surface density and the mass in Problem 2(C).
How to answer#
Work each problem on paper first, and on a computer where a part asks for it. Then type your result in the answer box and press Check. A number box accepts any value within the tolerance written next to it, in the unit named in the question. A formula box takes plain typing, for example vc^2*R/(R^2 + ra^2), and accepts every correct way of writing the answer. It treats its letters as independent, so each question says which letters to type: vc for , ra for , theta for , and R and G as they are.
Give a number answer to 3 significant figures and keep 4 in intermediate steps; an answer with only 2 significant figures may or may not be accepted. Where a box needs more digits, its label says so.
Problem 1 has 30 points and Problem 2 has 10: MIT gives Problem 1 triple weight. The split between the parts is ours. Several parts ask you to show or plot something. Those parts are marked by you: open the solution and compare. If you are stuck, open the hints one at a time. Each part ends with its full solution. Try before you open it: an answer given after its solution was opened earns no points. Your score is kept in this browser only.
Both problems use the link between a potential and the force per unit mass on a star, (eq. (78) of the Lecture 4 notes), and Poisson's equation, which ties the potential to the density that makes it:
In words
del squared capital phi equals 4 pi G rho
An overdot is .
Problem 1#
Orbits in a logarithmic potential
A star moves in the spherically symmetric logarithmic potential
In words
capital phi (r) equals v sub c squared log r over r ref
where and are constants. At apocentre, its largest distance from the centre, the star moves at the speed . Integrate the orbit numerically. Plot the position of the star in its orbital plane at equal time steps of roughly one fiftieth of the radial period, for 50 to 100 orbits. Plot the orbit both as a continuous line and as separate dots, so that the dots show where the star is most likely to be found, and comment briefly on what you see. The sheet asks for this as one task; we split it into four parts (our choice).
(a)6 points
Set up the equations. Put the orbital plane in the – plane and start the star at apocentre on the positive axis, , (our choice). Type the size of the angular momentum per unit mass with ra and vc. Then type the acceleration with vc, x and y (both our additions).
Hint
Why does the orbit stay in a plane? Then: at apocentre the distance from the centre is largest, so there. Which way does the star move?
Hint
The force per unit mass is . Find its size from , and split it into components with .
Solution
The idea. In a central potential energy and angular momentum are conserved; the star moves in the plane that holds its position and its velocity. At apocentre the velocity is all sideways.
The plane and the angular momentum
The force is central, so the angular momentum is constant (eqs. (104)–(105) of the Lecture 5 notes, p. 27). Position and velocity therefore stay in the plane perpendicular to . In polar coordinates in that plane the notes write
In words
r double dot minus r psi dot squared equals F(r), L equals r squared psi dot
with the force per unit mass. At apocentre , so the speed is all in the direction and
In words
L equals r sub a v sub a equals r sub a v sub c over 2
Our start is , , , , so that the star goes round anticlockwise.
The equations for the integrator
The pull has size and points to the centre. With :
In words
x double dot equals minus v sub c squared x over the quantity x squared plus y squared, y double dot equals minus v sub c squared y over the quantity x squared plus y squared
Written as four first-order equations for this is what any integrator takes. Two numbers to watch during a run are the energy per unit mass and the angular momentum,
In words
capital E equals one half v squared plus capital phi (r)
and ; both must stay constant.
Units
Changing adds a constant to and changes no force, so it drops out. Changing or only stretches the orbit in size or in time: the equations keep their form if lengths are measured in units of and speeds in units of (times in units of ). So we set , and (our choice). In these units and .
Check the result
Units: is (m/s)²·m/m² = m/s², an acceleration. For a circular orbit of radius the speed must satisfy , so every circular orbit has the speed (a flat rotation curve, as in Problem 2). Our star, with half that speed at , is too slow to stay at and falls inward: is indeed its largest distance.
(b)8 points
Before you integrate, find from the two conserved quantities (our additions): the pericentre , the smallest distance from the centre, as a fraction of ; the radial period , the time from one apocentre to the next, in units of ; and the angle that the star goes round the centre in one radial period, in degrees. The radial period sets the time step of the plot.
Hint
At a turning point and all the motion is sideways, with speed . Energy conservation then gives an equation for with two roots. One of them you know already.
Hint
Energy conservation gives at every radius. The time from pericentre to apocentre is , and the angle is with . The integrands grow without bound at the ends, but the integrals are finite: a numerical routine that does not evaluate the end points copes, or substitute , with the middle of the range. You can also read both off your integration in (c).
Solution
The idea. With fixed, the radial motion is one-dimensional motion in the effective potential; the turning points are where it equals the energy.
The effective potential
Eliminating with turns the energy into , with the effective potential of the notes
In words
capital phi effective (r) equals capital phi (r) plus L squared over the quantity 2 r squared
In our units, and :
The pericentre
At a turning point , so
In words
log r over r sub a plus r sub a squared over the quantity 8 r squared, equals one eighth
One root is . A numerical root search between and gives the other: .
The radial period and the angle
From the energy, . The star goes from pericentre to apocentre and back in one radial period, so
In words
capital T sub r equals 2 the integral from r sub p to r sub a of d r over the quantity the square root of 2 the quantity capital E minus capital phi, all minus L squared over r squared, end of root, capital delta psi equals 2 the integral from r sub p to r sub a of L d r over the quantity r squared the square root of 2 the quantity capital E minus capital phi, all minus L squared over r squared, end of root
Numerically, and rad . So one fiftieth of the radial period is about .
Check the result
For an orbit close to a circle the epicycle approximation applies. A flat rotation curve has (Problem 2(A)), so in one radial period the star goes round by . Our orbit is far from circular, and its angle is a little smaller, but of the same size. The integration in (c) gives the same three numbers. For a galaxy with km/s and kpc (our numbers) the unit of time is Myr, so Myr and kpc.
(c)10 points
Integrate the orbit for 50 to 100 radial periods and plot it as a continuous line. If your integrator takes fixed steps, find how small they must be, and watch the energy. Then choose in the first box what the orbit looks like, and give in the second box how many times the star has gone round the centre after exactly 100 radial periods (both our additions).
Hint
A good test of an integrator is the energy : plot over the whole run. A method that keeps the error small and bounded over a hundred radial periods is good enough for the picture.
Hint
The orbit would close after one radial period only if were exactly 360°, and after a few periods only if were a simple fraction of 360°.
Solution
The idea. A ready-made integrator with error control, or a simple symplectic one with a small enough step, follows the orbit for a hundred radial periods while keeping and fixed.
Our runs
We used SciPy's solve_ivp with the eighth-order Runge-Kutta method DOP853, a relative and absolute tolerance of , from the start of (a), in units (our choices). Over 100 radial periods and stayed constant to , and the radius stayed between and . We also ran the leapfrog method (kick, drift, kick) with a fixed step for 100 radial periods. The largest energy error over the run, with :
| Steps per radial period | Largest error in |
|---|---|
| 50 | |
| 200 | |
| 1000 |
The error falls as the square of the step, as it should for a second-order method, and it does not grow with time. With 50 steps per period it is 5% of : a step equal to the plotting interval is too long for this method, and a few hundred steps per period are needed.
The shape
Each radial period the star goes round by , not by 360° or by any simple fraction of it, so each apocentre lies 247.9° further round than the one before, short of a full turn (247.9° = 360° − 112.1°). The orbit is a rosette: loops that never repeat exactly and, over many periods, fill the whole ring . After 100 radial periods the star has gone round times; our integration gives the same, 68.86.
Check the result
Energy and angular momentum are conserved to the accuracy of the integration, and the turning radii and the time between apocentres match (b). A Kepler orbit, by contrast, closes after each radial period (Lecture 5 notes, eq. (119), p. 29): a potential that is less concentrated than a point mass turns the orbit by less than 360° per radial period.
(d)6 points
Now plot the position as separate dots at equal times of roughly one fiftieth of the radial period, over 50 to 100 radial periods, and look at where the dots crowd. Choose in the first box where they are densest. Then, as a number to compare with your dots (our addition), give the fraction of its time that the star spends in the outer half of its range, (our choice of the dividing radius).
Hint
Each dot stands for the same amount of time. Where does the star move slowly in ?
Hint
The time spent between and in one radial period is . Integrate it over the outer half and divide by . Or count your dots, if they do not all fall at the same few radii (see the solution).
Solution
The idea. Equally spaced times turn the orbit into a sample of where the star is: the density of dots is the probability density of finding the star at a place. The star lingers where its radial speed is small, at the two turning radii.
Where the dots crowd
The time spent per unit radius is proportional to , which grows without bound at both turning points, where . The dots therefore pile up in two bands, along the inner edge at and along the outer edge at . In our run (5001 dots, one every , for about 100.5 radial periods) the number of dots per unit area, in ten rings of equal width between and , was about 2.3 times the average in the innermost ring, about 2.0 times in the outermost, and about 0.65 times near the middle.
The time in the outer half
Splitting the integral of (b) at gives a fraction of the time in the outer half. Our dots agree: 64.0% of them lie outside . The star spends most of its time in the outer part of its orbit, where it moves slowly, and only a short time diving through pericentre. Per unit area the inner edge is still dense, because its ring is small.
A trap with the time step
If the dots are exactly apart, the radial motion repeats after every 50 dots, and all the dots fall on the same 50 points of the radial cycle: in the picture they line up on a few circles instead of filling the ring. That is why the sheet says "roughly": with a step of (our choice, close to ) the dots drift through the cycle and fill it. Exactly gave us only 62% of the dots in the outer half.
Check the result
The fraction lies between one half and one, as it must for a star that is slow near apocentre. For a nearly circular orbit, the radial oscillation is close to a pure cosine about the middle radius, and the fraction would be close to one half.
Problem 2#
The Mestel disc
A potential can be symmetric about an axis without being spherically symmetric. One known example is the flattened potential of the Mestel disc. In spherical coordinates , (with measured from the axis) it is
In words
capital phi (r, theta ) equals v sub c squared the quantity log r over r ref plus log the quantity 1 plus the absolute value of cos theta, all over 2
with and constants. The disc plane is , that is . In that plane, is the distance from the centre.
(A)3 points
Show that the Mestel potential gives a flat rotation curve in the disc plane. Then (our addition) use the notes' formula for the epicycle frequency and type in the disc plane with vc and R.
Hint
In the plane, a star on a circular orbit has equal to the inward pull. Which part of changes with ?
Hint
The angular frequency of a circular orbit is . The notes give in terms of and its derivative.
Solution
The idea. The angular part of the potential is a constant in the plane, so the radial pull there is that of the logarithmic potential of Problem 1.
The rotation curve
At , and . The second term is a constant. The pull towards the centre is , and a circular orbit needs equal to it:
In words
v squared equals capital R partial capital phi over partial r evaluated at theta equals pi over 2 equals v sub c squared
The circular speed is at every radius: the rotation curve is flat. (The pull along vanishes in the plane by the symmetry .)
The epicycle frequency
The notes give
In words
kappa squared equals r d capital omega squared over d r plus 4 capital omega squared
With (eq. (150), p. 34), and , so
In words
kappa squared equals minus 2 v sub c squared over capital R squared plus 4 v sub c squared over capital R squared equals 2 v sub c squared over capital R squared, kappa equals the square root of 2 v sub c over capital R
Check the result
lies between the point-mass value and the solid-body value , as it must for a rotation curve between falling and rising. It is the value used in the check of Problem 1(b).
(B)3 points
Show that the density of this configuration is zero everywhere off the plane , and infinite in the plane. As a step (our addition), type above the plane, for , with vc and theta.
Hint
Use Poisson's equation with the Laplacian in spherical coordinates; with no dependence on the azimuth, only the and terms remain. Above the plane .
Hint
Away from the plane the part and the part of the Laplacian may cancel. In the plane, compare just above and just below it.
Solution
The idea. Off the plane the potential is smooth and Poisson's equation gives its density, which turns out to be zero. In the plane the potential has a kink, whose second derivative is a spike.
The Laplacian
With no dependence on the azimuth,
In words
del squared capital phi equals 1 over r squared, times partial over partial r (r squared partial capital phi over partial r ) plus 1 over the quantity r squared sine theta, times partial over partial theta ( sine theta partial capital phi over partial theta )
The radial part is , since .
The angular part above the plane
For :
In words
partial capital phi over partial theta equals minus v sub c squared sine theta over the quantity 1 plus cos theta, partial squared capital phi over partial theta squared equals minus v sub c squared the quantity cos theta over the quantity 1 plus cos theta, plus sine squared theta over the quantity 1 plus cos theta, all squared
The angular part of the Laplacian is . Over the common denominator its bracket is , as in eq. (94) of the notes (p. 24). So
In words
del squared capital phi equals v sub c squared over r squared minus v sub c squared over r squared equals 0 which gives rho equals del squared capital phi over the quantity 4 pi G, equals 0
Below the plane changes sign throughout, and the same steps give zero again.
In the plane
As from above, ; from below, where and , it tends to . The slope of the potential jumps across the plane. The force per unit mass along , , is just above the plane (pointing towards larger , so down to the plane) and just below it (up to the plane). A finite jump in a first derivative makes the second derivative, and with it and , infinite in the plane, while its integral across the plane stays finite: all the mass sits in an infinitely thin sheet.
Check the result
A compact way to see the kink (our own rewriting): since , the potential is , smooth everywhere except through at .
(C)4 points
The surface density is the density summed along the direction, . Show that it is finite and equal to
In words
capital sigma equals v sub c squared over the quantity 2 pi G capital R
Then (our additions) take km/s and kpc (our numbers), with pc (km/s)²/M☉, and give in M☉/pc². Finally type the mass of the disc inside radius with vc, R and G.
Hint
Integrate Poisson's equation over a thin flat box that encloses a piece of the plane. By Gauss's theorem the integral of over the box is the flux of through its top and bottom faces.
Hint
For the mass, add up rings of area from the centre out to .
Solution
The idea. The density is a spike in , but its integral across the plane is set by the jump in the vertical pull, which is finite.
Gauss's theorem across the plane
Take a flat box of area in the plane, from just below to just above it. Integrating over the box gives (the sides add nothing as the box gets thin). With and , just above the plane ; just below it is . So
In words
capital sigma equals 1 over the quantity 4 pi G, times the quantity v sub c squared over capital R plus v sub c squared over capital R, equals v sub c squared over the quantity 2 pi G capital R
which is finite. The notes reach the same result by integrating over across the plane, with :
In words
capital sigma (r) equals 1 over the quantity 4 pi G, times v sub c squared over r, times the quantity 1 plus 1, equals 1 over the quantity 2 pi G, times v sub c squared over r
Integrated over , the surface density depends on the distance in the plane only; the sheet's is a slip (in the plane, ).
The numbers
M☉/pc².
The mass inside R
In words
capital M ( less than capital R ) equals the integral of sub 0 ^ capital R 2 pi capital R prime capital sigma ( capital R prime ) d capital R prime equals the integral of sub 0 ^ capital R v sub c squared over G, times d capital R prime equals v sub c squared capital R over G
For our numbers, M☉.
Check the result
Units: is (km/s)²/[pc (km/s)²/M☉ · pc] = M☉/pc². The mass grows in proportion to , as for the logarithmic potential, and holds here just as for a sphere; for a disc in general it does not, since the mass outside also pulls. A real galaxy gets much of its flat rotation curve from a dark matter halo, so its disc can be much lighter than a Mestel disc with the same .