Wednesday, April 30, 2014

More Final Exam Review Questions

  1. What can you use the Virial Theorem to derive? Go ahead and do the derivations!
  2. What is the temperature of a black marble placed in an orbit 2 AU away from the Sun?
  3. What is the Jeans Mass and Jeans Radius for a giant molecular cloud, how does they relate to star formation, and how do you derive these quantities? HINT: there are two methods
  4. What is the speed of a Jupiter-mass planet in orbit 1 AU from a 1 Msun star? How does this speed relate the the speed of the central star?
  5. What is the approximate relationship between the location of the habitable zone around a star and the mass of the star? 
  6. What is the transit duration of a Jupiter-size planet around a 1 Msun star? How about for a 2 Msun star?
  7. What is the scale height of a planet's atmosphere? How does the scale height of a nitrogen-dominated atmosphere (like ours) compare to that of a pure hydrogen atmosphere?
  8. Two stars are in orbit around each other separated by 1 AU. Star A has a mass of 2 Msun while Star B has a mass of 0.5 Msun. What are their relative speeds? What are their relative semimajor axes? What are their orbital periods? If they eclipse, how long does the eclipse last (keep in mind that both stars are moving)?
  9. How can we use the Sun's spectrum, along with other observations of the Sun to measure the AU?
  10. Two planets orbit a Sun-like star. One planet has a radius of 1 Rjup, and the other has a radius equal to the Earth's. Compare the transit depths.
  11. How does the velocity of a star orbited by a planet depend on the mass of the planet, the semimajor axis of the orbit and the mass of the star?
  12. How fast is a particle moving in a gas cloud of temperature T?
  13. Astronomers often assume that the luminosity of a main-sequence star scales as $L \sim M^4$. Where does this come from?
  14. The target field of the NASA Kepler Mission was at an RA of 18 hours and a declination of +30. When does the target field cross the meridian at midnight? Can we observe stars in the Kepler field from Cambridge tonight?
  15. What is the flux at the surface of a star of radius $R_\star$ and temperature $T$? How does this flux change at a distance $d > R_\star$?
  16. Check out the visual binary star Alberio by doing a Google images search. Compare the properties of the two stars.
  17. Why are red dwarf stars such good targets for searching for habitable-zone planets?
  18. What is the main sequence? How is luminosity related to effective temperature on the main sequence?
  19. If a star is 4 magnitudes brighter than another star, what is the flux ratio of the two stars? Try this question for various values of the magnitude difference.
  20. How does the flux of a star depend on its distance? How does its magnitude depend on distance?
  21. What are the (approximate) transit parameters of the following transit light curves assuming that all of the planets have 3-day orbits?
  22. Assuming the central star has a mass of 2 $M_\Sun$, what are the properties of this planet? Compare your properties to that of Pollux b.
  23. How does the luminosity of a star depend on its temperature and radius?
  24. How does the surface flux of a star depend on it's temperature and radius?
  25. What is the speed of Jupiter compared to the speed of the Earth? Compare their momenta. Compare their kinetic energies.
  26. What is the diffraction limit of the human eye observing at 0.5 micron?
  27. What is the diffraction limit of a 100 meter telescope observing at 1mm?
  28. What is the angular diameter of the Sun as viewed from Saturn (approximately 9 AU)?
  29. What is the angular diameter of the Sun as viewed from alpha Centauri A (approximately 1 pc)?
  30. How many AU away is alpha Cen A?
  31. If the Sun were powered by gravitational collapse, how long would it shine at its current luminosity?
  32. How does the lifetime of a star scale with its mass? Look up the stars in the alpha Cen triple system on Wikipedia. Compare their lifetimes.

Thursday, April 24, 2014

Midterm review practice problems

It's that time of year again . . . finals.  After the midterm, I wrote some addtional problems on that material to help those who wanted to review it.  I figured I'd make these available as practice problems for those who want to revisit this material before the final. It should be emphasized that the final will focus on post-midterm material, but understanding the first half of the class well will undoubtedly help you both now and in your future endeavors!


Wednesday, April 9, 2014

On the mass conservation equation of stellar structure

In class, this perhaps was not completely transparent.  Let's try again.  Consider a spherical shell of thickness dr located at radius r from the center of a sphere.  It will have surface area \(4\pi r^2\) and we can, since dr is very small, get its volume just by taking it to be a rectangular prism with area \(4\pi r^2\) and thickness dr, so its volume is
$$dV=4\pi r^2 dr.$$

At a radius r, the star has density \(\rho (r )\), so the differential mass enclosed by this shell is just
$$dM=\rho( r)dV=4\pi r^2 \rho (r ) dr.$$

Dividing both sides through by dr, we have the mass conservation equation:
$$\frac{dM}{dr}=4\pi r^2 \rho (r ).$$

Note that if we integrate from zero up to radius R, we get the total mass within radius R:

$$M (<R )=\int_0^R 4\pi r^2 \rho ( r) dr.$$

Note also that differentiating this integral with respect to R will give
$$\frac{dM}{dR}=4\pi R^2\rho ( R)$$
by the fundamental theorem of calculus!

In class, Professor Johnson argued that we have
$$M=\frac{4}{3}\pi r^3\rho ,$$ so we can differentiate to get
$$\frac{dM}{dr}=4\pi r^2 \rho .$$

This is not quite right.  Mass only equals \( \frac{4}{3}\pi r^3 \rho\) if \(\rho \) is the average density of the star, and that is not a function of radius: it is just total mass divided by total volume.  So we do not recover that we must evaluate the density at a specific radius in the mass conservation equation if we approach it this way.  Also, if we did make \(\rho \) a function of radius, then differentiation would lead to two terms by product rule, as Jimmy pointed out in class.  So this derivation is not the best way to think about mass conservation.

Wednesday, April 2, 2014

Earth's atmosphere: how good is our model from class?

In class, we worked out how the density would scale with radius in the Earth's atmosphere using 2 assumptions: 1) taking the gravitational acceleration to be constant and equal to \(g=\frac{GM_{\oplus}}{R_{\oplus}^2}\) and 2) taking the atmosphere to be isothermal (all at the same temperature T). Here, I'll discuss what happens when you relax those assumptions, one at a time, and then go on to discuss a more realistic model of Earth's atmosphere. Let's first relax assumption 1) but keep assumption 2). Set up force balance on a parcel of mass with mass m, area A, and thickness \(\Delta r\) at a radius r above the center of the Earth: $$F_g+A(-P(r+\Delta r)+P(r))=0.$$ Now before we had used \(F_g=mg\) for the force of gravity, but now let's account for the fact that the mass is at some radius \(r>R_{\oplus}\). In other words, \(mg\) is the gravitational force at the Earth's surface; but we want the force at some distance \(h=r-R_{\oplus}\) above the surface. We have $$F_g=-\frac{GM_{\oplus}m}{r^2}.$$ We can then write $$-\frac{GM_{\oplus}m}{r^2}=A(P(r+\Delta r)-P(r )).$$ Now note that for a parcel with density \(\rho( r)\), the mass is \(m=A\Delta r\rho(r )\). Note that we have let the parcel's density be a function of \(r\) here because the density is changing as you go up in the atmosphere. We don't yet know \(what\) function of \(r\) \(\rho\) is, but we'll find out! Rewriting our previous result by replacing the mass and then dividing both sides by area \(A\) and \(\Delta r\), we get $$-\frac{GM_{\oplus}\rho(r )}{r^2}=\frac{dP}{dr}.$$ Note that, just as we did in class, I've rewritten \( (P(r+\Delta r)-P( r))/\Delta r \) as \(dP/dr \). We now use the ideal gas law, which is a good approximation for our atmosphere, provided we use the right average particle mass from the atmosphere's measured composition, to replace \( P(r )=\rho( r) k_B T/\bar{m} \), where we remember assumption 2) is still in force so \(T\) is not a function of \(r\). \(\bar{m}\) is the average mass per particle, which we used to write the number density in the ideal gas law as a mass density over a mass. We now have the differential equation $$ -\frac{GM_{\oplus}\rho(r )} {r^2}=\frac{d\rho}{dr}\frac{k_B T}{\bar{m}}.$$ We can rearrange this to read $$-\frac{GM_{\oplus}\bar{m}}{k_B T r^2}dr=\frac{d\rho}{\rho}.$$ We can now integrate both sides of this equation to find \(\rho (r )\), but before we do so, let's look at the physical meaning. The left-hand side (lhs) compares the gravitational energy due to a fractional increas in radius \(\Delta r/r)\), with the thermal energy, \(k_B T\). To make that clearer, remember, gravitational PE is $$PE=-\frac{GM_{\oplus}m}{r},$$ so we can rewrite $$-\frac{GM_{\oplus}m}{r^2}dr=-\frac{GM_{\oplus}}{r}\frac{dr}{r}=PE\times\frac{dr}{r}.$$ So this is saying, if we go up by a fractional radius \(\dr/r\), then the potential energy will change by PE times that fraction. How much the PE changes relative to the thermal energy determines the fractional change in density, \(d\rho/\rho\); that's what the right-hand side is telling us. Now let's solve: $$-\int_{R_{\oplus}}^r \frac{GM_{\oplus}\bar{m}}{k_B T r^2}dr=\int_{R_{\oplus}}^r \frac{d\rho}{\rho}.$$ We find $$\frac{GM_{\oplus}\bar{m}}{k_B T}\frac{1}{r}\bigg|_{R_{\oplus}}^r=\ln \rho \bigg|_{R_{\oplus}}^r,$$ which can be rearranged and simplifed to give $$\rho ( r)=\rho(R_{\oplus})\exp\bigg[\frac{GM_{\oplus}\bar{m}}{k_B T}\big[\frac{1}{r}-\frac{1}{R_{\oplus}}\big]\bigg].$$ To make sense of this, let's write \(r\) in terms of \( R_{\oplus}\) and height \(h\) above the Earth's surface, as $$r=R_{\oplus}+h=R_{\oplus}\left(1+\frac{h}{R_{\oplus}}\right).$$ We can then Taylor expand \(r^{-1}\) about \(h=0\), meaning \(h/R_{\oplus}\ll 1\). Doing so we have $$r^{-1}\approx \frac{1}{R_{\oplus}}\left(1-\frac{h}{R_{\oplus}}+\left(\frac{h}{R_{\oplus}}\right)^2+\cdots\right).$$ Let's see what this does in our expression for \(\rho\), specifically in the term $$\big[\frac{1}{r}-\frac{1}{R_{\oplus}}\big].$$ We can see the 1 in the expansion will be canceled out by the \(\frac{1}{R_{\oplus}}\) above, and at lowest order in \(h\) we recover the result from class for constant gravitational force, \(\rho \propto e^{-h}\). We have $$\rho (h )=\exp\left[\frac{PE}{E_{th}}\left[-\frac{h}{R_{\oplus}}+\left(\frac{h}{R_{\oplus}}\right)^2\right]\right].$$ Note that I've rewritten this in terms of the ratio of potential energy to thermal energy, for the physical reasons discussed earlier (before we integrated). You can see that accounting for the variation of the force of gravity with \(r\) slightly increases the density, because the term in \( \left(h/R_{\oplus}^2\right) \) is positive. Note that it's also small, because typical heights would be much less than the Earth's radius. Using that idea, we can even Taylor expand the whole exponential, this time by factoring out \(\frac{h}{R_{\oplus}}\) to have $$\exp\left[-\frac{PE}{E_{th}}\frac{h}{R_{\oplus}}\left[1-\frac{h}{R_{\oplus}}\right]\right]=\exp\left[-\frac{PE}{E_{th}}\frac{h}{R_{\oplus}}\right] \times \exp\left[-\frac{PE}{E_{th}}\frac{h}{R_{\oplus}}\frac{h}{R_{\oplus}}\right].$$ Approximating the second exponential, we have . . .

Wednesday, March 26, 2014

Marion's intro to the eclipsing binary lab

Academy Award nominations for best cinematography welcomed!

Monday, March 17, 2014

Dealing with outliers in the sunspot rotation period data

Some of you may have noticed that a few sunspot rotation period values differ a lot from the rest---they are outliers.  How do we deal with them more systematically than just deciding to ignore them?

Here's a simple way.  Compute the average of the data using all of it, and also the standard deviation \(\sigma\), given by
$$\sigma=\sqrt{\frac{1}{N}\bigg( \sum_{x\in data} x^2-mean^2}\bigg),$$

where the sum is over all points x in the dataset and there are N points.  You now have a quantitative measure of how much the outliers outlie: for each datapoint, subtract the mean from it and then divide by \(\sigma\).  Outliers will have the highest values of this quantity (it's called a "z-score").  You can now compute a new mean for your average weighting the data points by one over this factor squared: that way the outliers will contribute less to the mean. To compute the new mean, do the sum

$$<x>_{\rm corrected}=\bigg[\frac{1}{N}\sum_{x\in data}\frac{x^2}{z^2(x)}\times \sum_{x\in data} \frac{1}{z^2(x)}\bigg]^{1/2}.$$

The second term above is so that you don't end up multiplying the mean by some overall factor just because you've introduced a weighting; weighting by the inverse square of the z-score turns out to be better than the naive thing you might do, weighting by just the inverse of the z-score.  The idea here is just this: you want points that are outliers, which will have higher z-scores, to contribute less to the corrected average.  Imagine a point extremely far from the mean: its z score would be so large that it would contribute very little to the corrected average.

This technique should give you a more accurate estimate of the mean than just including the outliers.  It won't necessarily be more accurate than ignoring the outliers altogether, but it is more objective in that you don't need to make the subjective decision as to which points are outliers.  Indeed, one thing to try might be doing the mean this way, and then doing it by removing any points altogether that have a z-score larger than, say, 2.5.  Compare results and see which you think is better!

Thanks to Scott Zhuge and Louise Decoppet for catching some mistakes!

Improving the estimate of the Sun's rotational speed

To estimate the Sun's rotational speed in the AU lab, we took two points on the Sun's edges and used them to estimate the Sun's rotation speed.  See the picture!



In particular, we took the two points with the greatest difference in speed and assumed they were on a line perpendicular to the Sun's rotation axis, and hence gave a good estimate of the rotation speed.  This is because, for a solid body rotating at some angular frequency \(\omega\), the rotation speed of a point on the surface is
$$v=r\omega,$$
with r as shown on the picture below.



Since we are not accounting for any angle dependence in our computation (i.e., we used \(r=R_{Sun}\)), we have taken it that \(\gamma=90^{\circ}\).  But in reality it may not be.  Using two pairs of points we can determine its actual value, and thence correct the rotation velocity estimate.  For the pair of points c and d, we have the velocity difference \(\Delta v\), which we define as \(\Delta v_{ij}=v_i-v_j\), to be

$$\Delta v_{cd}=2r\omega=2R_{Sun}\omega\sin\gamma,$$
while for the pair of points e and f we have
$$\Delta v_{ef}=2x\omega=2R_{Sun}\omega\cos\gamma.$$

Note that \(x=R_{Sun}\sin(90^{\circ}-\gamma)=R_{Sun}\cos\gamma\); you should convince yourself that the angles are really as I've drawn them.  In so doing, you may want to remember that vertical angles are equal.

With our two equations for two different \(\Delta v\)s, we can solve for \(\gamma\) as
$$\gamma=\tan^{-1}\bigg[\frac{\Delta v_{cd}}{\Delta v_{ef}}\bigg].$$

The true rotation velocity difference is then just
$$\Delta v_{true}=\Delta v_{cd}\frac{1}{\sin\gamma}=\Delta v_{cd}\bigg[\frac{\sqrt{\Delta v_{cd}^2+\Delta v_{ef}^2}}{\Delta v_{cd}}\bigg]=\sqrt{\Delta v_{cd}^2+\Delta v_{ef}^2}.$$

Note the true velocity difference is larger than or equal to our uncorrected result, since \(\sin \gamma \leq 1\); the last result also clearly shows this!  To get to the last result, I used the identity that
$$\sin\bigg[ \tan^{-1}\left(\frac{X}{Y}\right)\bigg]=\frac{X}{\sqrt{X^2+Y^2}}.$$


A note on Taylor series and the Wien law

Just a brief note with a comment on a mistake I saw in a number of blog posts on deriving the Wien displacement law from the blackbody distribution.  Many of you used a Taylor series for \(e^u-1\) to solve the transcendental equation
$$5=\frac{ue^u}{e^u-1}$$.

You argued that by Taylor series, \(e^u-1\approx (1+u)-1=u\) so that the equation becomes, expanding both top and bottom,
$$5=\frac{u(1+u)}{(1+u-1)}=1+u\to u=4.$$

However, this isn't right.  A Taylor series is only valid inside the "radius of convergence":  fancy language for "small displacements from the point you are expanding about."  This should be no surprise: for any function, if you approximate it by a line, that will only be a good approximation locally (unless the function is just a line!)

More formally, a Taylor series says
$$f(x+\Delta x)=\sum_{n=0}^{\infty} \frac{f^{(n)}(x)}{n!}(\Delta x)^n$$

and the expansion for \(e^u-1\) above takes only the n=0 and n=1 terms.  But consider \(\Delta x >1\):   then the powers of \(\Delta x\) above grow with n, and the higher n terms contribute more.  In short, the series does not converge: you have gone outside the radius of convergence.  This is all to say that you cannot use a Taylor expansion of \(e^u-1\) about u=0 for a value of u near 4!

Indeed, the correct logic was to recongnize that for u larger than, say, 2, \(e^u\gg 1\) so the denominator can be written as approximately \(e^u\), canceled with part of the numerator, and the correct answer,
$$u=5,$$

determined.

Sunday, March 16, 2014

Some latex tips for blogging

Hi, everyone!

As you work on your blog writeups for the AU lab, here are some handy latex tips based on minor pointers I've been giving out as I've been reading blogs.

To get matching-ly sized parentheses, use \left( \right).  These commands demand a matched set; if you don't want to worry about this, or for some reason need just one big parenthesis, use \big( or \bigg(.

Put negative signs outside fractions, as \(-\frac{1}{2}\) looks better than \(\frac{-1}{2}\).

Make sure all superscripts and subscripts with more than one digit or symbol are inside a curly brackets: this makes the difference between
\(2^10\) and \(2^{10}\), which can be a significant one!

Use the symbols for Sun and Earth: for the Sun, subscript \odot, and for the Earth subscript \oplus, which show up as (e.g. for the masses):
$$M_{\odot}$$
and
$$M_{\oplus}.$$

You may want to use tables to display data: this can be a tiny bit of a pain, so here is a super-cool internet tool to make it easy!

http://www.tablesgenerator.com

You make the table how you want it, and the site generates the needed latex code.

Thursday, February 27, 2014

Small Angle approximation

Just a note on the small angle approximation!

This approximation is that \(\sin\theta\approx \theta\) when \(\theta\) is in RADIANS.   The angle must be in radians for this to work.  For instance, I cannot say that \(\sin 0.1^{\circ}\approx 0.1\).  If I want the sine of the small angle \(0.1^{\circ}\), I need to first convert it to radians.  There are 57.14 degrees in one radian. Another number to know is that there are 3600 arcseconds in one degree---also, 3600 seconds in one hour.  So I like to remember that degrees are to arcesconds as hours are to seconds.

Finally, a good number to know is that 1 radian  \(=2\times 10^5\) arcseconds.

Thus, if we have an object that has angular size 2 arcseconds, it is \(10^{-5}\) radians.

And, for those of you who haven't seen the small angle approximation before, it just comes from Taylor series.

We have

$$\sin\theta\approx 0+\theta^2+\cdots$$ for small \(\theta\), and
$$\cos\theta\approx 1+\cdots$$ for small \(\theta\)  just by using Taylor's theorem (Taylor series).

Note that this means
$$\tan\theta\approx \sin\theta\approx\theta$$ for small angles (in RADIANS!).

Saturday, February 22, 2014

Celebrating 50 years of modern cosmology at Harvard

In case you missed the announcement last week:
On a bright spring morning 50 years ago, two young astronomers at Bell Laboratories were tuning a 20-foot, horn-shaped antenna pointed toward the sky over New Jersey. Their goal was to measure the Milky Way galaxy, home to planet Earth

To their puzzlement, Robert W. Wilson and Arno A. Penzias heard the insistent hiss of radio signals coming from every direction—and from beyond the Milky Way. It took a full year of testing, experimenting and calculating for them and another group of researchers at Princeton to explain the phenomenon: It was cosmic microwave background radiation, a residue of the primordial explosion of energy and matter that suddenly gave rise to the universe some 13.8 billion years ago. The scientists had found evidence that would confirm the Big Bang theory, first proposed by Georges LemaĆ®tre in 1931.  
You can read more here

And you can follow the Smithsonian Astrophysical Observatory (SAO) @SmithsonianMag on Twitter. The SAO is one component of the Harvard-Smithsonian Center for Astrophysics (CfA) located just off campus at 60 Garden St. and 160 Concord Ave.

Here are the lectures from the event:

Wednesday, February 19, 2014

Mona Lisa in Fourier space: how you can become a frequency artist





After class last Thursday a few people showed some interest in how one might take Fourier transforms of images, along the lines of the Mona Lisa example we did in class.  I looked around and couldn't find a simple Internet interface where one can do this, but if you're still interested it shouldn't be horrible to just do this using python, a free math language that is "the wave of the future" in research.  


This will probably take an hour or two if you still want to do it, but it's worth it if you plan to do more astronomy or do research---I use python daily for mine, for instance. Below are instructions on how to get it all going.


I, Marion, or Luke are glad to help out with any of this in person, and I have an example program I wrote last year that does an FT of an image I could share if there's interest---email astro16.

step 1: get python
go here for installation instructions:
and lots of useful links here:

step 2: load in image from file to python
this will store the image as an array, just a table of numbers basically

step 3: fourier transform image
explained here 
(though your file won't be in fits format, but that doesn't matter---once it's an array you can use the python fft packages this post describes; note fft=fast fourier transform, just an algorithm for doing fts)

step 4: plot it
gives you many ways to plot in python.  you will want a 2-d method since you have an image to plot

Thursday, February 13, 2014

Fourier Transforms! The True Story

In class today, Prof. Johnson went over the math behind Fourier transforms.  Here we'll recap that---with a somewhat math-y idea, one may need more than one pass!

The Fourier transform is just a way to express any function as a sum of cosines and sines with different frequency.  To build up a given function, you need different amounts of each frequency component.  This can be expressed if we use discrete frequencies by writing

$$f(x)=\sum_n \bigg[ia_n \sin(\omega_n x)+b_n \cos(\omega_n x)\bigg].$$

The \(a_n\) and \(b_n\)  are the weight that the sine and cosine with frequency \(\omega_n\) contribute to the total sum building up \(f\).

Now if we let the frequencies take on any value instead of using some discrete set of frequencies
$$\big\{\omega_1, \omega_2,\cdots,\omega_n \big\},$$ we go from a sum over discrete frequencies to an integral over all possible frequencies.

So we write
$$f(x)=\int_{-\infty}^{\infty} F(\omega)\big[i\sin(\omega x)+\cos (\omega x)\big] d\omega.$$

Notice I've added in an \(i=\sqrt{-1}\)  to the sine term.  That's so that we can keep separate track of our sines and cosines---we can recover their coefficients by looking at the imaginary and the real parts of the Fourier transform.  Check out this picture (black dot is F, the F.T. of f(x)):




There's nothing that fundamental about this: it's just a choice we include in the definition of the Fourier transform.  There are things called "Fourier sine transforms" and "Fourier cosine transforms" where you use only sines or cosines, and then you don't need to worry about the i. However, because sine is an odd function (symmetric about x=0), you can only represent other odd functions with a sum of sines.  The opposite holds for cosine: it's even, so you can only represent other even functions with a sum of only cosines.

Anyway, we have the convenient identity that

$$e^{i\omega x}=\cos(\omega x)+i\sin(\omega x).$$

This is actually not too scary to show.  Just write out the Taylor series for each side:
$$\sum_{n=0}^{\infty}\dfrac{(i\omega x)^n}{n!}=\sum_{n\;odd} \dfrac{(\omega x)^n}{n!}(\pm1)+\sum_{n\;even}\dfrac{(\omega x)^n}{n!}.$$

Incidentally, I am lazy: I calculated these Taylor series using wolframalpha.com: go there and type in "Taylor series for e^(iwx)""Taylor series for sine" and "Taylor series for cosine."
It is not a joke that my GPA in college went up about 30% around the time wolframalpha came online! USE it---it's good to do the calculation on paper once, so you know you can, and can have an intuition for when the computer's wrong, but then you should ease up any algebra you can with things like this!

Okay, so using this we can now write our Fourier transform as

$$f(x)=\int_{-\infty}^{\infty} e^{i\omega x}F(\omega)d\omega.$$

Now suppose we wanted to actually FIND \(F(\omega)?\)  It turns out that if we multiply both sides of the above equation by \(e^{-i\omega' x}\) and then integrate both sides with respect to x, we will get

$$\int_{-\infty}^{\infty}f(x)e^{-i\omega' x}dx=\int_{-\infty}^{\infty}dx e^{-i\omega' x}\int_{-\infty}^{\infty} e^{i\omega x}F(\omega)d\omega.$$

It turns out that the righthand side will be zero except when \(\omega=\omega'\).  This is a cool mathematical thing that I'll come back to at the end.  But for now, it means that we MUST HAVE \(\omega=\omega'\), meaning the equation reduces to

$$\int_{-\infty}^{\infty}f(x)e^{-i\omega' x}dx=F(\omega).$$

So now we can go ahead and calculate Fourier transforms!  I should note that usually, there's a factor of \(2\pi\) in front of all of the \(\omega\)s, because they are really angular frequency.  For this reason, usually a factor of \(1/2\pi\)  will show up in front of one or the other side of the equation above for \( F(\omega)\).
to be continued . . .
---
Finally, a point about modulus.  Modulus is the magnitude of a complex number, and it is a little bit more complicated than just taking an absolute value as you'd do to find the magnitude of a real number!  Have a look at the diagram below!



Wednesday, February 12, 2014

Feynman Quote on Waves and Seeing and Astronomy


"If I'm sitting next to a swimming pool, and somebody dives in...I think of the waves and things that have formed in the water. And...when there's lots of people have dived in the pool there's a very great choppiness of all these waves all over the water and to think that it's possible, maybe, that in those waves there's a clue as to what's happening in the pool. That some sort of insect or something with sufficient cleverness could sit in the corner of the pool and just be disturbed by the waves, and by the nature of the irregularities and bumping of the waves have figured out who jumped in where and when and where what's happening all over the pool. And that's what we're doing when we're looking at something. [T]he light that comes out is ... is waves, just like in the swimming pool except in three dimensions instead of the two dimensions of the pool it's they're going in all directions. And we have a eighth of an inch black hole into which these things go ... which...is particularly sensitive to the parts of the waves that are coming in a particular direction it's not particularly sensitive when they're coming in at the wrong angle which we say is from the corner of our eye. And if we want to get more information from the corner of our eye we swivel this ball about so that the hole moves from place to place. Then it's quite wonderful that we can see, to figure [things] out so [easily.]"

From smithlab.net. Transcribed from footage included in the documentary "The Last Journey of a Genius" (1989) by Christopher Sykes, a BBC TV production in association with WGBH Boston and Coronet/MTI Film and Video

Tuesday, February 11, 2014

Double Slit Geometry

Implied, but not stated on the worksheet is the need to derive the geometry that leads to a cosine pattern on the screen behind a double-slit setup. Here's a 10-minute lecture describing this geometry. When he gets to the examples starting at the ~5:00 mark, you should pause the video and try to get the answer for yourself first, and then check against his answer.



Here are two nice demonstrations of diffraction, using water and laser light:



Finally, here's a Minecraft experiment showing the particle-wave nature of chickens

Wednesday, February 5, 2014

Guidelines for worksheet problem writeups on your blog

In order to facilitate efficient reviews and grading of your problem solution writeups, please use the following guidelines for your current and future blog posts.

Title: Worksheet ____, Problem ____ : [Custom name of your choice]

Content: At the top of your post, state the question in bold.

Figures: Be sure to cite your source of any images, diagrams or figures used, except for figures that you create.

Acknowledgements: At the bottom of your document, acknowledge who assisted you with your solution.

Reading, viewing and this week's vocabulary words

Before the next class session, be sure you read Chapter 1, with particular attention to Section 1.3. Reading is Fundamental! Especially for this class with our emphasis on active, collaborative learning over traditional lectures. We're putting off telescopes and optics until Monday to favor depth of learning over breadth of material covered. Blog posts due next Tuesday should focus on problems 1-4 on the Worksheet. Problems 5-7 will be the focus of the following week's blog posts.

You can find supplemental reading on the celestial sphere at Sky & Telescope. Here's another helpful video:



Here's a list of key vocabulary words:

Zenith
Meridian
Elevation
Azimuth
Right ascension
Declination
Hour angle
Latitude (on the Earth, and its relation to declination)
Longitude (on the Earth, and its relation to right ascension)

The goal of this week is for you, the student, to be able to tell me if a star at a given right ascension and declination is observable tonight (irrespective of clouds!). In other words, is a given RA overhead at night at this time of year? Here's a practice problem:
The star HD209458 has a transiting planet. In fact, it was the first transiting planet ever detected by Earthlings, by Harvard's own Prof. David Charbonneau and collaborators way back in 1999 (Charbonneau et al. 2000. See also Henry et al. 2000). If it were clear tonight (not likely, but play along), could we observe this star tonight (Feb 5, 2014) with the Clay telescope on the roof of the Science Center? HD209458 is at RA$ \approx 22$ hours, and a declination of about +19 degrees.


Deriving Kepler's law

For worksheet 1, we used Kepler's law

$$P^2=\frac{4\pi^2a^3}{GM}.$$

P is the period, a the orbital separation (actually the distance to the mutual center of mass (barycenter)), G Newton's constant, M the Earth's mass.  How do you get this?

We can use the test case of a circular orbit to derive it.  While this is not the most general (in general, under gravity closed orbits must be ellipses; a circle is an ellipse with zero eccentricity), a circular orbit must satisfy this law, and so can be used to obtain it.

We balance centrifugal force with gravity (*):

$$\frac{mv^2}{a}=\frac{GMm}{a^2}.$$

m is the mass of the smaller object orbiting; here we approximate that $$m\ll M,$$ so the mutual center of mass is about at the Earth's center and we can just use the Earth's mass as the mass being orbited (the really correct thing to do is to use the reduced mass $$\mu=\frac{Mm}{M+m},$$ which becomes approximately $$M$$ here).

Solving the force balance equation (*) out for v, we get
$$v=\left(\frac{GM}{a}\right)^{1/2}.$$

Now, the orbital period is $$P=2\pi a/v,$$

so substituting in v we find

$$P=\frac{2\pi a^{3/2}}{GM},$$
and finally squaring both sides we get Kepler's law.

In class, Prof. Johnson mentioned that the factor of $$4\pi^2$$ is hard to remember.  It should be easy now: it is actually just coming from the fact that the period is proportional to the circumference, $$2\pi a,$$  and so $$P^2$$ will have a $$4\pi^2$$ in it.

Tuesday, February 4, 2014

Helpful Videos and Apps Illustrating the Celestial Sphere

Many students are struggling with the concept of the celestial sphere right now. It is not an easy concept, but it's key for understanding how observational astronomers locate and study objects in the sky using telescopes. This topic is usually not covered in a physics-oriented astronomy course at the level of Ay16, which I think is a shame since it's so central to the enterprise of astronomy.

Make no mistake about it: this is a tough concept. We live on a moving, tilted platform, which is good for getting a view of the entire universe, but troublesome for devising an intuitive coordinate system. Yesterday in class was our first pass. We'll take more passes at it in TALC, and we'll linger on the topic Thursday. Our next lesson on telescopes and optics can wait a class session until we're comfortable with the sky.

If you're struggling with these concepts, it's okay. It really is! I struggled mightily as a graduate student at UC Berkeley 12 years ago, and I now have the benefit of tons of experience. But when the TFs and I were preparing for this lesson, we struggled again! Embrace the struggle as runners embrace the burn pushing themselves for that extra mile, or weight lifters struggle against 10 extra pounds in the bench press, or a musician struggles against playing the piece just a bit faster.

Here's a short but wonderfully clear video illustrating the Earth in relation to the celestial sphere. Watch it and watch it again. Then watch it again :)



Here's a fun simulator to help you visualize the Earth's relation to the celestial sphere, as viewed from the stars (watching the Earth rotate) and from the Earth (watching the stars rotate across the sky). I found this simulator on the Astronomy Education at the University of Nebraska-Lincoln.

Google is your friend in this class. We live in an age of a plethora of online tools to help you understand key concepts that we won't have time to cover explicitly in class. When you find something helpful, write a blog post and refer your classmates to it. Let's help each other through these tough concepts.




Monday, February 3, 2014

Solved problems from math review worksheet

By popular demand, I am going to solve a few problems from the basic math review worksheet here.

 5. a. The amount an object's speed v changes with time is proportional to its current speed.


$$ \frac{dv}{dt}\propto v(t).$$

Note this is a differential equation that can be solved by rearranging: $$\frac{dv}{v}=dt.$$ Integrating both sides we find $$\ln v=t+C,$$ C a constant of integration, meaning that $$v=v_0\exp(t),$$ where we set the value of C by saying the initial velocity is $$v_0.$$ In more detail, $$v=e^{t+C}=e^te^C=v_0e^t$$ with $$e^C=v_0$$ (we can choose C such that this is true because C was just an arbitrary integration constant!)

b.  A is inversely proportional to the square root of B.

$$A\propto \frac{1}{\sqrt{B}}.$$

c.  An object's speed v varies sinusoidally with a period P and a phase $$\phi.$$

$$v(t)=\sin \bigg(\frac{2\pi}{P}t+\phi \bigg).$$

d.  The flux F of an astronomical source decreases with distance according to the inverse square law.

This law comes from considering the radiation from the source to be emitted isotropically into a sphere of radius d, with surface area $$4\pi d^2.$$  So we have

$$F=\frac{L}{4\pi d^2},$$  where L is the luminosity, which is the energy output per unit time of the source.

e.  The number of stars, N, per unit mass, M, is given by a powerlaw in mass with an index $$-\alpha.$$

This problem was not perfectly worded!  What we meant was the amount of stars dN with masses in the range M, M+dM, where dM is small (really, infinitesimally small!), is given by a powerlaw in mass.  This translates as
$$\frac{dN}{dM}\propto M^{-\alpha}.$$

This is a typical way of specifying the distribution of initial masses with which stars are born.  That is, not all stars are like our Sun, just like babies are born with different weights---some heavier, some lighter.  There is a pattern to the distribution of stars' initial masses, called the IMF, for Initial Mass Function, and it is a subject of intense debate and study.  It turns out that it is set partially by turbulence in the gas from which stars form and partially by the scale on which pressure from the gas is able to balance gravity (called the Jeans length).

f.  The pressure in the atmosphere decreases exponentially from an initial value $$P_0$$ to a value $$P(z)$$ with an e-folding length H.

e-folding means the time a quantity takes to change by one factor of e = 2.818 (note e is also given by the infinite series
$$\sum_{n=0}^{\infty}\frac{x^n}{n!},$$ which I mention to justify the seemingly totally random value of e as having some kind of symmetrical, elegant origin).

We have
$$P(z)=P_0 e^{-z/H},$$ with z one's height above ground and H more conventionally called the "scale height."  You might wonder why this is true?  Fundamentally, it is because the atmosphere is made up of billions of air molecules that are bouncing around. All of these particles are bouncing in a gravitational field that wants them to all end up on the Earth's surface.  The faster ones get to go up higher.  So the density will decrease as you go up from the Earth's surface, because there are fewer particles with high speeds than with low.  That is because for an ideal gas in equilibrium (a reasonable model here), the velocities are "Maxwellian":  the probability of finding a particle with velocity v is proportional to $$v^2e^{-v^2}$$---you'll learn more about that in a statistical mechanics course!  Now, pressure scales with density, and as we've seen, the density is determined by the velocity probability distribution.  Exponential in, exponential out.

7.  Write the ideal gas law in terms of gas pressure P, mass density $$\rho,$$ and temperature T.

It is $$P=\frac{\rho}{\mu m_p}k_{\rm B}T,$$  where $$\mu$$ is the mean particle mass in units of the proton mass $$m_p$$ and $$k_{\rm B}$$ is Boltzmann's constant.

8.  Calculate the derivative of:
a. 1/(1-x)

Rewrite as $$(1-x)^{-1}$$ and then use the Chain Rule: $$-(1-x)^{-2}(-1)=(1-x)^{-2}$$ is the derivative.

b. $$e^{-x}$$.  Derivative: $$-e^{-x}.$$

c.  $$\sin x.$$ Derivative: $$\cos x.$$

d.  $$\cos x.$$ Derivative: $$-\sin x.$$

e.  $$\ln(1-x).$$  Again use Chain Rule.  Derivative: $$\frac{1}{1-x}(-1)=-\frac{1}{1-x}.$$

f.  $$\bigg(e^{-x}-1\bigg)^{-1}.$$  Again use Chain Rule.  $$-\bigg(e^{-x}-1\bigg)^{-2}\bigg(-e^{-x}\bigg),$$ which simplifies to
$$e^{-x}\bigg(e^{-x}-1\bigg)^{-2}.$$

9.  Taylor expansions represent functions as sums of powers of their arguments.  They do this by taking successive approximations to the function: first-order Taylor series models the function as a straight line, second-order as a straight line plus a parabola, etc.  For the second-order series, we need the first and second derivatives.  We have the first derivatives from problem 8.; we differentiate again to get the second derivatives.  Let's do $$e^{-x.}$$  The second derivative is
$$e^{-x}.$$  For a Taylor expansion around x=0, we evaluate the derivatives at zero and then multiply them by respectively, x and $$x^2.$$  We also weight the contributions by 1/n!, where n is the order of the derivative.  Finally, we need a constant term: the value of the function itself at x=0.  Think of that as a vertical offset to the whole curve we are trying to model. Putting it together, we have
$$e^{-x}\approx 1-x + \frac{x^2}{2}.$$  We could easily have gotten this from the series representation of $$e^{x}$$ given earlier by letting x go to -x.

Let's do one more: $$\ln(1-x)$$ about x=0.  We have
$$\ln(1-x)\approx -x+\frac{x^2}{2}.$$

10.  Integrals of the functions in 8. (note: these should be evaluated at $$x_{min}$$ and subtracted from their value at $$x_{max}$$ for the definite integral.)

a.  Use the substitution u=1-x, du=-dx to see that
$$\int \frac{1}{1-x}dx=-\ln (1-x).$$

b.$$\int e^{-x}dx=-e^{-x}.$$

c.  $$\int \sin x dx =-\cos x.$$

d.$$\int \cos x dx=\sin x.$$

e.  $$\int \ln(1-x)dx$$ is tricky.  We should integrate by parts (a very similar example is done in the Basic Math Review page on integration!) to find
$$x\ln(1-x)+\int\frac{x}{1-x}dx,$$ and can then set $$u=1-x$$ to do the remaining integral.

f.  $$\int \frac{1}{e^{-x}-1}dx.$$  This one is also quite hard!  I actually didn't know how to approach it immediately, so still working on a good intuitive explanation!









Thursday, January 30, 2014

Tuesday, January 28, 2014

Calculus review: integration II

3) Trig substitutions
Often an integrand can be much simplified by a trigonmetric identity, such as $$\sin ^2 +\cos^2=1,$$ or $$1+\tan^2=\sec^2.$$  For instance, consider the integral

$$\int_a^b \frac{dx}{\sqrt{1-x^2}}.$$

We know that $$1-\sin^2=\cos^2,$$ so what if we let $$x=\sin \theta?$$

We then have the squareroot as cos, and $$dx=\cos \theta d\theta,$$ so our integral is now

$$\int_{\arccos a}^{\arccos b}\frac{\cos\theta d\theta}{\cos\theta}.$$

Simplifying, we get
$$\int_{\arccos a}^{\arccos b}d\theta=\theta \bigg |_{\arccos a}^{\arccos b}.$$

Done.

Let's try another one.  What if we want to do

$$\int _a^b \frac{dx}{1+x^2}?$$

Let's try letting $$x=\tan\theta,$$ which means $$dx=\sec^2\theta d\theta.$$  We then have

$$\int _{\arctan a}^{\arctan b} \frac{\sec^2\theta d\theta }{\sec^2 \theta}.$$  Simplifying, we get

$$\int _{\arctan a}^{\arctan b}d\theta=\theta\bigg| _{\arctan a}^{\arctan b}.$$

Done.  Notice that, as with integrating by substitution, you have to remember to calculate dx and also change the limits of integration.

4) Partial fractions
Suppose we want to integrate what is called a rational function: a ratio of two polynomials.  For instance,
$$\int \frac{x^3+2x^2-x}{x^2-1}dx.$$

We might first think of making a substitution either with $$u=x^2-1$$ or perhaps a trig substitution, but we end up being better served if we notice that the integrand can be written as

$$\frac{x^2}{x-1}+\frac{x}{x+1}.$$  We can then integrate the first term of this sum using the substitution $$u=x-1,\;du=dx:$$
$$\int\frac{x^2}{x-1}dx=\int \frac{(u+1)^2}{u}du=\int \frac{u^2+2u+1}{u}du.$$

Dividing all of the terms by u gives us
$$\int \big[u+2+\frac{1}{u}\big]du,$$

which can easily be integrated.  The second term of the sum can be integrated with the substitution $$u=x+1,\;du=dx.$$

What we have done here is decomposed one fraction into a sum of fractions: basically, reversed what you do when you add fractions and find the least common denominator.  This technique is called partial fractions.  Usually you can just reconstruct the form you need with a bit of guess and check, by writing the numerators of the terms in the decomposition as a+bx and c+dx, for instance, and solving for a, b, c, and d by adding the terms and demanding equality of the coefficients of each power of x with the original fraction.




Calculus review: integrals

An integral is very similar to a sum.  If a curve is described by a function, the integral of that function between two x values gives you the area under it on a graph.  There are many approximation schemes for integrals that just compute them as sums, such as Midpoint Rule, Trapezoid Rule, or Simpson's Rule.  Integration is also the inverse operation of differentiation: taking the derivative and then the integral of a function gets you back the original function.

Here, we are going to assume some familiarity with integration and remind the rusty among you of how to do a bit more . . .

The most basic functions can be integrated just by remembering the derivative formulae and inverting.  For instance,
since $$\frac{d x^n}{dx}=nx^{n-1},$$ if we want to integrate $$x^m,$$ we can let $$m=n-1$$ and see that  $$\frac{1}{n}\frac{d x^n}{dx}=x^{n-1}$$ and replace n-1 with m to see that
$$\int x^m=\frac{1}{m+1}x^{m+1}.$$  We can then check by differentiating: we get $$x^m,$$ so all's well that ends well!

$$e^x,\;\sin x,\;\rm{and}\;\cos x$$ can all be handled using this principle too.

For more complicated functions, there are five major techniques, which we'll look at in increasing order of complexity.
1) Integration by substitution
2) Integration by parts
3) Trig substitution
4) Partial fractions
5) Gaussian integrals
6) Completing the square in Gaussian integrals

1) Integration by substitution
Given a composition of functions, it is often convenient to define a new variable for the inner function.  For instance, let's compute
$$\int_a^b \big[ 1+x\big]^2dx$$
by defining $$u=1+x,$$ $$du=dx.$$
We then have
$$\int_{1+a}^{1+b} u^2 du=\frac{u^3}{3}\bigg|_{1+a}^{1+b}$$
Notice a few things:
a) we have replaced the limits of integration: if x runs from a to b, u=1+x runs from 1+a to 1+b.
b) we have replaced dx with dx=du: in general, we need to differentiate u and solve algrebraically for dx in terms of du, and then replace dx with its value in terms of du.

Let's do a harder example:
$$\int_a^b \big[1+2x \big]^{1/2}dx.$$
Let $$u=1+2x,\;du=2dx$$ so that
$$dx=\frac{du}{2}.$$
We then find
$$\int_{1+2a}^{1+2b} \frac{u^{1/2}}{2}du=\frac{u^{3/2}}{2}\bigg|_{1+2a}^{1+2b}.$$

To do these without making a mistake, it's good to go step by step.  First, write out clearly what u equals and then du = . . . dx, and solve carefully for dx.  Then make these replacements in the integral.  After that, make sure to change the bounds of integration to have the right range for the new variable!

2) Integration by parts
Often an integrand is of the form of a product of two functions, one of which is has a simple integral.  How do we handle these cases?  Write the integral as
$$\int u dv$$ where dv is the function that has a simple integral.  We then have the formula
$$\int_a^b u dv=uv\bigg|_a^b-\int_a^b v du.$$  Try differentiating this formula to prove it is the correct integral of u dv:
$$\frac{d}{dx}\big[uv\big|_a^b-\int_a^b v du\big]=u \frac{dv}{dx}+v\frac{du}{dx}-v\frac{du}{dx}.$$

Let's try an example.  Conveniently, this example will turn out to give us a useful formula for the integral of natural log.

$$\int \ln x dx=\int 1 \cdot \ln x dx.$$

We don't know how to integrate $$\ln x,$$ so we better not have it be our dv.  But we do know how to integrate $$1dx:$$ that's just x!  So we set
$$u=\ln x,\;dv=1dx.$$

We then have
$$\int \ln x dx=x \ln x - \int \frac{x}{x}dx=x\ln x -x.$$

This is great because we now have a general technique for integrating any power of x against natural log.  Let's try x:

$$\int x \ln x dx=\int \ln x dx=\frac{x^2}{2} \ln x - \int \frac{x^2}{2x}dx=\frac{x^2}{2}\ln x -\frac{x^2}{4}.$$

Try deriving the formula for $$\int x^n \ln x dx$$ yourself!

Another integral commonly evaluated using integration by parts is $$\int x^n e^x dx,$$ where n is a positive whole number.  Here things get a little trickier.  We want to eventually lower the integrand to involve only $$e^x$$ and no powers of x, so we need to do something that lowers the power of x each time we do it.  This suggests letting $$u=x^n,$$ because $$du=nx^{n-1}.$$  We then have

$$\int x^n e^x=x^n e^x-\int nx^{n-1}e^xdx.$$  We can then integrate the integral by parts again to reduce the power of x by one more, and keep doing so until we get the integrand to be $$e^x,$$ which we know how to integrate.


Calculus review: derivatives

In the excellent novel The Poisonwood Bible, the self-taught main character says that "Calculus is the mathematics of change."  Heraclitus, an ancient Greek philosopher, wrote that "Change is the only constant," (and has been unwittingly quoted by many motivational speakers since), and so calculus is ubiquitous in mathematical descriptions of nature.  Calculus intrinsically is neither easy nor hard: it's just a language---becoming fluent requires practice.  The focus of this course will be to do things in the least mathematical way possible, so don't get too stressed about calculus, but it is a good thing to have in one's toolkit moving forwards.

Derivatives
A derivative just describes how much one quantity changes as you vary another quantity that it depends on.  Graphically, if you have a curve, the derivative at a point gives the slope of the line touching the curve (tangent) at that point.  Here we'll just describe how to compute most of the cases you'll ever need.

Formula
$$\frac{d}{dx}x^n=nx^{n-1}$$
Proof
Use definition of derivative as the limit of a difference:
$$\frac{d}{dx}x^n=\lim_{\Delta x\to 0}\frac{(x+\Delta x)^n-x^n}{\Delta x}.$$
Since we are taking the limit as $$\Delta x\to 0,$$ we can treat it as very small compared to $$x,$$ and rewrite the above as
$$\lim_{\Delta x\to 0}\frac{x^n(1+\Delta x/x)^n-x^n}{\Delta x}\approx \lim_{\Delta x\to 0}\frac{n x^n\Delta x/x}{\Delta x}$$
$$=nx^{n-1}.$$

The approximate equality comes from using the "most useful approximation ever" we showed in the Basic Math Review:
$$\big[1+\epsilon\big]^n\approx 1+n\epsilon.$$

Formula
$$\frac{d}{dx}e^x=e^x$$
Proof
Write
$$e^x=\sum_{n=0}^{\infty}\frac{x^n}{n!}$$ and differentiate each term using the previous formula to find
$$\frac{d}{dx}e^x=\sum_{n=1}^{\infty}\frac{x^{n-1}}{(n-1)!}+0$$
where the 0 comes from the $$n=0$$ term in the original series, which has derivative zero.
Then re-index the sum to again start at 0, by transforming $$n-1\;\rm{to}\;n.$$  The result then follows.

Note: the formula for e as a sum above is super-useful! 
It immediately gives you the approximation for e at small x by just dropping terms that are quadratic or above in x:
$$e^x\approx 1+x$$
as well as an approximation for $$\ln\big[1+x\big]$$
by taking the natural log of both sides of $$e^x\approx 1+x$$
to get
$$x\approx \ln\big[1+x\big]$$ for small x.

Incidentally, the series for e can also be used, by comparison with the series expansions for sine and cosine, to prove Euler's formula! (substitute in $$x=i\theta$$ and just algebra it out!)

Chain Rule
A very useful way to do derivatives of compositions of functions.  What is a composition of functions?  Well, $$\big[1+x\big]^2$$ is one example!  Inside the brackets, you take x to 1+x.  That's one function:
$$f(x)=1+x.$$  Then outside the brackets, you take that function, f, to its square: $$g(f)=f^2.$$
So we can write the initial expression as g of f.  What if we want to do the derivative of something of that form?  It is
$$\frac{d}{dx}\big[g\circ f\big]=\frac{dg}{df}\frac{df}{dx}$$
An easy way to remember this is to imagine the df's canceling out, much like how one would write out unit conversions, e.g. meters to feet as $$1\; \rm{m} \times \frac{3\;\rm{ft}}{\rm{m}}=3\;\rm{ft}.$$  We won't prove this formula here---maybe you can think of a proof!

Formula
$$\frac{d\ln x}{dx}=\frac{1}{x}$$
Proof
Write x as
$$x=e^{\ln x},$$ which is true by the definition of ln.  Then differentiate both sides, using Chain Rule for the righthand side:
$$1=e^{\ln x}\frac{d\ln x}{dx}.$$
Then simplify using that $$e^{\ln x}=x,$$ and divide both sides by x:
$$\frac{1}{x}=\frac{d\ln x}{dx}.$$

Formula
$$\frac{d\sin x}{dx}=\cos x,\;\frac{d\cos x}{dx}=-\sin x.$$
Proof
Use Euler's formula to write sin and cos as complex exponentials.
Then
$$\frac{d\sin x}{dx}=\frac{d}{dx}\bigg(\frac{1}{2i}\big[e^{ix}-e^{-ix}\big]\bigg)=\frac{1}{2i}\big[ie^{ix}+ie^{-ix}\big].$$
The second equality above is using Chain Rule to differentiate $$e^{ix}.$$
Simplifying the righthand side, we have
$$\frac{1}{2}\big[e^{ix}+e^{-ix}\big]=\cos x.$$
It's nearly the same to compute the derivative of cos: try it for yourself!


Basic math review

Here we aim to go over some math things that will be useful in the course.  This is by no means exhaustive, and some of the things below may not come up.  But we hope this will be a useful place to turn as a first quick resource if you're feeling a little rusty . . .

Fraction division
To divide one fraction by another, remember: Kentucky Chicken Fried (Keep Change Flip):

$$\frac{a}{b}\div \frac{c}{d}=\frac{a}{b}\times\frac{d}{c}$$

Geometry
Area of a triangle =  $$\frac {1}{2}\rm{base}\times\rm{height}$$
Area of a circle = $$\pi r^2$$
Circumference = $$2\pi r$$
Volume of a sphere = $$\frac{4}{3}\pi r^3$$

Differential volume in spherical coordinates $$dV=r^2 dr \sin \theta d\theta d\phi$$
If the function you are integrating against this differential volume is angle-independent, you can use
$$dV=4\pi r^2 dr$$

Finally, notice that if you integrate the above over r from 0 to R, you get
$$\int dV = 4\pi \int_)^R r^2 dr=\frac {4\pi}{3}R^3$$
---the volume of a sphere!  And if you ever forget what dV is, just take the expression for the volume of a sphere and differentiate to get dV for a spherically symmetric problem.

Trigonometry
Just comes from the Greek for "triangle measuring": so any time a triangle shows up in a problem, you probably want to think trig.

Mnemonic for sine, cosine, tangent: SOHCAHTOA, or "Some Old Horse Caught A Horse Taking Oats Away"---meaning,

Sine = Opposite/Hypotenuse
Cosine = Adjacent/Hypotenuse
Tangent = Opposite/Adjacent

and recall that 1/Sine = Cosecant (abbreviated Csc)
and . . .           1/Cosine = Secant (abbreviated Sec)
Finally, . . .     1/Tangent = Cotangent (abbreviated Cot)

More advanced trigonometry
Euler's formula: $$e^{i\theta}=\cos\theta+i\sin\theta$$ with $$i=\sqrt{-1}$$

This formula can be used to write
$$\sin \theta =\frac{1}{2i}\big[e^{i\theta}-e^{-i\theta}\big]$$
and
$$\cos \theta =\frac{1}{2}\big[e^{i\theta}+e^{-i\theta}\big]$$

Notice that if you flip the sign of the angle, sine changes sign (punny?), while cosine does not---that is no surprise, because we know that sine is an odd function and cosine is an even one.

Euler's formula is great because you can also use it to quickly derive the double-angle formulae for sine and cosine:

$$(\sin \theta)^2=\frac{1}{2i}\big[e^{i\theta}-e^{-i\theta}\big]^2$$
$$=-\frac{1}{4}\big[e^{i2\theta}+e^{-i2\theta}-2\big]$$
$$=\frac{1}{2}\big[1-\cos2\theta \big]$$

Working through similar math for cosine:
$$(\cos \theta)^2=\frac{1}{2}\big[e^{i\theta}+e^{-i\theta}\big]^2$$
$$=\frac{1}{4}\big[e^{i2\theta}+e^{-i2\theta}+2\big]$$
$$=\frac{1}{2}\big[\cos2\theta+1\big]$$

Now notice that adding these results together gives
$$\sin^2\theta+\cos^2\theta=1$$
---hopefully a familiar identity!  It's really just the Pythagorean theorem applied to a triangle with hypotenuse 1, because by the definitions of sine and cosine, the legs of the triangle will be sine and cosine if the hypotenuse is 1.

Finally, note that you can even use Euler's formula to get formulae relating higher powers of sine and cosine to higher multiples of the angle, e.g. $$\sin^3\theta$$ in terms of $$\sin 3\theta,$$ for instance.  You would just use the Binomial Theorem to expand the binomial (two terms added together)
$$\big[e^{i\theta}\pm e^{-i\theta}\big]^n$$ out, and then simplify, just like we did for $$n=2$$ above.

Most useful approximation ever
90% of astrophysics problems involving two terms taken to a power can be handled using what's below.
Suppose you have something of the form
$$\big[1+\epsilon\big]^n,$$
where $$\epsilon\ll 1.$$
Using the Binomial Theorem to expand this out, you'd get
$$1+n\epsilon +\rm{tems\;in\;higher\;powers\;of\;\epsilon}.$$
Because $$\epsilon\ll 1,$$
all these higher powers can just be neglected, since taking anything less than 1 to a power makes it smaller, the higher the power the smaller.
So we have
$$\big[1+\epsilon\big]^n\approx 1+n\epsilon.$$
Note that in astrophysical problems you often may have to factor out something to get a 1 in the first term, and can then apply this expansion. For this reason it's always good to consider the relative scales of any two quantities that have the same dimensions.





Monday, January 27, 2014

Week 1 assignments


Hi, everyone!  Just a note on week 1 assignments: the lab activity we did today should be written up as one of the blog posts for this week.  It is labeled "worksheet," but it's really a lab, so you should write up the whole thing, not just 1 or 2 parts of it!

Great work in class today and see you Thursday!  We'll also be putting up some information on how to use MathJax to get Latex (a way to typeset equations and math symbols) in blogger, so check back soon!

Welcome!

Welcome!  This blog will be an additional source for Harvard's astronomy 16 class, taught by Professor John Johnson with assistance from Luke, Marion, and Zack.  We'll be doing posts on a variety of topics here, from sample problem write-ups to useful supplemental material.  Check out our first post, a review of basic math that may be helpful as you get into the course.  And check back regularly!  We welcome feedback and post ideas at harvardastro16@gmail.com, and you can also reach us individually at the emails given on the syllabus!

with best wishes for the course,
Professor Johnson, Marion, Luke, and Zack