Tuesday, July 26, 2011

Statistical Mechanics in an even potential

I dug this up from a Midterm examination I had on Statistical Mechanics a few years ago.

Suppose we have a system of particles confined to a potential given by

$U(x) = \alpha x^{2n}$

for integer n and $\alpha$ a real valued constant of appropriate units. If the system contains N particles at temperature T, we would like to calculate the heat capacity and the entropy.

Let's start by calculating the partition function. By definition,

$Z = \Sigma e^{-\beta E}$

Where $\beta = \frac{1}{k_b T}$ as usual, and we are summing over all energy states E. Since our potential function is continuous, the energy states take the form:

$Z = \int e^{-\beta ax^{2n} dx$

Now let $x = u (\beta a)^{\frac{-1}{2n}}$. Then $dx = du (\beta a)^{\frac{-1}{2n}$ and $x^{2n} = u^{2n} (\beta a)}$. This gives us

$Z = \int e^{-u^{2n}}(\beta a)^{\frac{-1}{2n}} du$

This integral looks pretty hard, particularly because we don't know anything specific about the value of n. If n is one, we can come up with an answer. For anything else, we're in some trouble. But what we do know is that, whatever the answer is, it is some number. So let's just call that number $\lambda$ and not worry about it. Thus

$Z = \lambda (\beta a)^{\frac{-1}{2n}}$

The heat capacity is given by

$C_v = \frac{1}{k_b T^2}\frac{\partial^2 \ln Z}{\partial \beta^2}$

This is very convenient, because the factors a and $\lambda$ will drop out in this step:

$C_v = \frac{1}{k_b T^2}\frac{\partial^2}{\partial \beta^2} \big( \ln \lambda + \frac{-1}{2n}\ln a + \frac{-1}{2n}\ln \beta \big)$

$C_v = \frac{1}{k_b T^2}\frac{1}{2n}\frac{1}{\beta^2} = \frac{k_b}{2n}$

The entropy is

$S = \frac{\partial}{\partial T}(k_b T \ln Z)$

$S = \frac{k_b}{2n}\big(\ln\beta + 1 \big)$

I skipped a few steps on the last line, but it's just calculating some derivatives. The limiting case here is $n = 1$, which is just a harmonic oscillator. You can see that as the potential gets more anharmonic, we decrease the entropy and the heat capacity. This should not be that surprising--these anharmonic oscillators require far more energy for a displacement, and hence the number of available states is confined for increasing n.

Thursday, July 21, 2011

Bouncing Ball in a Cavity II

I thought today I'd review the bouncing ball in a cavity problem I looked at a couple days ago. In the original post, I had calculated the number of bounces that it would take the ball to hit the ground. I was thinking today that I'd just finish off the problem by calculating the trajectory. Nothing really fancy here, I'm afraid. I put everything into a normalized coordinate system, with normalized X given by $X^\prime = \frac{x}{L}$, $Y^\prime = \frac{y}{\phi^2}$ and $T^\prime = \frac{t}{\frac{L}{V_0}}$. I then just worked out the positions vs time by brute force--because X'(T') is not differentiable, there isn't really an elegant way to make these plots. I only plotted for $\alpha = 0.9$ and $\phi = 6$, which gives $N = 4.84$, so four bounces total. Here are the results.

X'(T') is pretty much what you'd expect. Linear and non-differentiable as I said. You'll notice that the time between each direction change is growing as you'd expect in this situation.

Y'(T') is perfectly parabolic, since in the original problem I had the loss in velocity only along X'. The proper way to do this is probably to have the loss be a loss in kinetic energy rather than X velocity, but this complicates matters substantially, since the x and y components of velocity change at different rates. I don't know that there's a really nice way to do this.


And here's the trajectory of the bouncing ball. Y' depends on $X^'2$, of course, although looking at the plot it is a bit hard to tell. I expect if I had chosen a different value of $\phi$ and $\alpha$, then this would probably be more pronounced.

Wednesday, July 20, 2011

Perturbed Infinite Well

Let's take a look at a problem from quantum mechanics. Suppose we have an infinite square well of length L that contains a particle. Inside the well, the particle is subject to a potential given by

$V(x) = 2V_0 (\cos(\frac{2\pi x}{L}) - 1) (O < x < L)$


And suppose we wish to calculate the associated spectrum of such a particle. Our first instinct might be to try to calculate this analytically, but you'll quickly realise that the differential equation that we end up with her is somewhat non-trivial. This problem can be tackled using time independent perturbation theory, however. First we need the zero order basis functions for this system. Fortunately, this is very easy to calculate. If we use the time-independent Schrodinger equation for the flat square well, we find that:

$\big(-\frac{\hbar^2}{2m}\frac{d^2}{dx^2} - E\big)\psi = 0$

The solutions to this equation are sine functions, specifically, we find that

$\psi^{0}_n = \sqrt{\frac{2}{L}}\sin(\frac{n\pi x}{L})$
$E^{(0)}_n = \frac{n^2 \hbar^2 \pi^2}{2mL^2}$

These solutions are valid for all $n \ge 1$, naturally, and describe sine waves bound within the box. With our basis set in hand, we can now proceed to the perturbation theory. The first order correction to the energy is given by

$E_n = E^{(0)}_n + E^{(1)}_n$

Where

$E^{(1)}_n = \big<\psi^{(0)}_n|V|\psi^{(0)}_n\big>$

You can the derivation for this result here, if you like.  This is what we'll want to work out. Let's expand this whole mess.

$E^{(1)}_n = \frac{4V_0}{L}\int_0^{L}\sin(\frac{n\pi x}{L})^2 (\cos(\frac{2\pi x}{L}) - 1) dx$

We can write $\sin(\frac{n\pi x}{L})^2 = \frac{1 - \cos(\frac{2n\pi x}{L})}{2}$ on our way to solving this integral. This gives us the following


$E^{(1)}_n = \frac{4V_0}{L}\int_0^{L} \frac{1 - \cos(\frac{2n\pi x}{L})}{2} (\cos(\frac{2\pi x}{L}) - 1) dx$

This gives us four terms to evaluate.

$E^{(1)}_n = \frac{4V_0}{L} \int_0^{L}\big( \cos(\frac{2\pi x}{L}) + \frac{1}{2}\cos(\frac{2n\pi x}{L}) - \frac{1}{2} - \frac{1}{2}\cos(\frac{2n\pi x}{L})\cos(\frac{2\pi x}{L})\big) dx$

The first three terms are trivial. If you recall your Fourier theory, you'll remember also that integrals in the form of the fourth term are also exactly zero unless $n = 1$, hence this collapses to:

$E^{(1)}_n = -2V_0(1 + \delta_{n1})$

Where $\delta_{n1}$ is the Kronecker delta. Each level experiences an energy shift equal to $-2V_0$, except, curiously, the first level, which experiences a shift twice as large.

Tuesday, July 19, 2011

Bouncing Ball in a Cavity

Here's a quick, fun problem I just thought up. Suppose you have a rectangular cavity like the one I've drawn below. A ball is fired vertically across the cavity with initial velocity $V_0$. When it hits the wall, its direction is reversed and it bounces back the other way. Suppose that at each bounce, its x-velocity is decreased by $\alpha$. How many bounces will the ball make during the trip?



I decided to do this problem with only the x-velocity changing on bounces since it gets pretty complicated if both x and y (or kinetic energy, say) is changing, but it should be doable in principle either way. To start off, let's calculate the time it takes the ball to hit the ground.

$h = \frac{1}{2}gt^2$
$t = \sqrt{\frac{2h}{g}$

Easy enough. Now what about the velocity in the x direction? Well, for the first pass, we have:

$L = V_0 t_0$

But the next pass takes longer...

$L = V_0 \alpha t_1$

If we add up all of the times that it travels along x, we should get the total y time...

$\sqrt{\frac{2h}{g}} = \frac{L}{V_0} + \frac{L}{V_0\alpha} + \frac{L}{V_0\alpha^2} + \ldots$

Let's define $\phi = \frac{\sqrt{\frac{2h}{g}}}{\frac{L}{V_0}}$. This is the ratio of the total travel time to the single pass time. If $\alpha$ were equal to zero, this value alone would give us the number of passes N. As it is, we've still got some more work to do:

$\phi = \Sigma_{i=0}^{N-1} \alpha^{-i}$

This is a geometric series and can be computed analytically:

$\phi = \frac{\alpha^{-N} - 1}{\alpha^{-1}-1}$

Rearrange a bit:

$\phi (\alpha^{-1}-1) + 1 = \alpha^{-N}$

And finally

$N = \frac{\ln \big( \phi (\alpha^{-1} - 1) \big)}{\ln (\alpha^{-1})}$



Here's some graphs of N vs $\phi$ for different values of $\alpha$. Intuitively, this is pretty much what we might expect: as $\phi$ (that is, the ratio between the total time and the single-pass time) grows, we get progressively more bounces, but the effect is moderated significantly by the energy lost per bounce. For relatively small $\alpha$ like the pink graph, we get many bounces, although we still end up with only about half as many bounces as the $\alpha = 1$ case where no energy is lost.

I'll look at the trajectories in part II

Monday, July 18, 2011

Wormhole Geometry

I dug this one up from a General Relativity class I took a few years back. I'm a little rusty on the subject, so I can't guarantee that this will be that sensible to follow. Problem courtesy of Werner Israel.

A "wormhole" is a staple of science fiction writing, but it actually describes a particular structure in general relativity that has, if not real world applications, at least academic ones. The wormhole is described by the following metric:

$ds^2 = dr^2 + (r^2 + a^2)d\Omega^2 -dt^2$

Where s a line element in this space, r is a radial coordinate, $\Omega$ is an element representing both $\theta \& \phi$, and t is time. a is a constant. Note that a normal spherical coordinate metric has $a = 0$, of course. What does this thing look like? Well, at any r, we sweep out a sphere of radius $\sqrt{r^2 + a^2}$ in constant time. Or, if you prefer, at constant t and $\theta$, it sweeps out circles of radius $\sqrt{r^2 + a^2}$. I've drawn a picture of what that looks like below




Don't worry too much about what the axis mean. What I'm really drawing is the shape of the coordinate system that I've described, for any $\theta$. Most importantly, you can see that the coordinate system allows for non-trivial solutions at $r = 0$. By comparison, the spherical coordinate system, drawn in this manner, is a cone, and vanishes exactly at $r = 0$. This is why the former is describes as a wormhole: it has no singular points, and thus may in principle allow passage from negative to positive values of r.

We can calculate the energy density and radial pressure for such an object to exist. The energy density required to maintain the wormhole is given by the zero component of the stress-energy tensor, and radial pressure by the first component:

$\rho = T_0^0$
$P_r = T_1^1$

We would like to convert this to a spherically symmetric metric, because metrics of the following form can be computed relatively easily.

$ds^2 = e^\alpha(r)dr^2 + r^2 d\Omega^2 - e^\gamma(r)dt^2$

To do so, let

$r^2 = u^2 - a^2$
$dr^2 = \frac{u^2 du^2}{u^2-a^2}$

So that

$ds^2 =\frac{u^2 du^2}{u^2-a^2} + u^2 d\Omega^2 - dt^2$

Then the functions

$e^\alpha = \frac{u^2 du^2}{u^2-a^2}$
$e^\gamma = 1$

The zero component is then given by

$8\pi u^2 T_0^0 = \frac{d}{du}\big(u e^{-\alpha} - u\big)$

This equation can be derived by calculating $R_{00}$ of the curvature tensor. I won't show that here, as it is a bit of work. It is fairly standard. This simplifies very nicely.

$8\pi u^2 T_0^0 = \frac{d}{du}\big(\frac{-a^2}{u}\big)$

Thus

$T_0^0 = \rho = -\frac{a^2}{8\pi u^4}$

The energy density is negative. Objects with negative energy density might be considered gravitationally repulsive--or have a negative mass. That is, our wormhole geometry would only exist in a dark energy or inflationary regime.

Likewise, we can calculate the radial pressure from a similar expression.

$8\pi u^2 T_1^1 = e^{-\alpha}(1 + u\gamma^\prime) - 1$

$\Gamma = 0$ for our case, so we end up with an identical expression for the pressure:

$P_r = \frac{-a^2}{8\pi u^4}$

I think it is basically coincidental that these two terms work out to be equal. They aren't actually equal in magnitude, of course, since I'm using units in which $c = G = 1$. The pressure is negative, which again, suggests that this object is inflationary--namely that there is an outward pressure that will drive objects away from the centre of the wormhole.

Now, as to the question of whether wormholes exist, well, I can't really say. We live in an expanding universe, and such a universe would have a negative pressure driving it. But beyond that, it's hard to say much. We haven't found the existence of any localized objects that display these sorts of properties. It's also unclear that you would ever be able to "pass through" the wormhole in any meaningful sense--as you approach $r=0$, the outward pressure tends to infinity, so anything approaching the wormhole would be blown out of it. As such, wormholes in the science fiction sense will probably mostly remain as just that--fiction--but maybe, possibly, somewhere in the universe, there might be an object with similar properties to this.

Wednesday, July 13, 2011

What this is all about

This blog is basically a place where you can come and learn about physics. I will do problems from as many topics across the discipline as I have experience in, as best as I am able. I will try to do a broad difficulty range from high school, undergraduate, to graduate level. I will pull these problems from a variety of sources at my disposal, or I'll just make them up if I think of something interesting. I will generally try to avoid problems from common texts (Griffiths, etc.) because these sorts of problems are addressed all the time in other venues, but may look at problems from more non-standard texts.

Feel free to submit problems to me that you think are interesting and educational. I can't guarantee I will do all of them, but if it seems worthwhile, I will look at it.

I am not here to do your homework. If you are having problems in a course, then you should consult your professor or your TA.

Why do rainbows form?

I thought I'd start off with a classic problem in optics: Why do rainbows appear?

Rainbows are the result of a property of matter called dispersion. What dispersion means is that, when light passes through a material, the refractive index of the light will depend upon its wavelength (or frequency, if you prefer). If you recall Snell's law, you'll recognize that the angle that light is refracted through a material depends on the refractive index. Therefore, if the refractive index itself depends on wavelength, this will cause different colours to deflect at different angles and split apart. The splitting that we see gives rise to rainbows.


The dispersion relation for water is fairly complicated. I will be using the relation found here, where I've taken a temperature of 293.15K (20C), and density of $1000 kg/m^3$. Solving this for n, we get a relation that looks like this:

$n = \sqrt{\big(\frac{1+2C(\lambda)}{1-C(\lambda)}\big)}$

Where $C(\lambda)$ is the numerical relation listed in the reference. Graphically, the dispersion relation looks like this, which probably tells us all we really need to know


The refractive index doesn't change by much, but it changes enough for it to make a big difference, as we'll see.

Let's now calculate the refraction of light through a spherical droplet. You can see the setup that I'll be using in the figure.

I've labelled the incident angle $a$, the refracted angle $b$. The normals are all in blue, and I've shown the paths of a red and green ray to illustrate the differences this will likely make. Note that, by definition, the outgoing ray a will be the same input and output angles $a$ and $b$, respectively. We're interested in the angle $q$, which is the change between the entry ray and the exit ray. Note that we don't know any of the angles at this point. We don't actually need them at this point, because the angles are all related.

The angles $a$ and $b$ are related by Snell's Law. That is,

$\sin a = n(\lambda) \sin b$

I've set the refractive index of water to 1. I note here that $n$ is dependent on $\lambda$ as above. I won't include it beyond this point, however, for brevity's sake. Now, you'll note that all of the normal line converge in the middle, by definition of the way circles work. The angles $c$ form isoceles triangles with the angles b. In a total circle the angles add up to 360 degrees, hence.

$360 = 2a + 2c + q$

But $b$ and $c$ are related as well.

$360 = 2a + 2(180 - 2b) + q$

This simplifies to a relation between q, b, and a.

$q = 4b - 2a$

Let's take the derivative of Snell's law and the derivative of the equation above, with respect to $b$.

$\frac{dq}{db} = 4 - 2\frac{da}{db}$
$\cos a \frac{da}{db} = n\cos b$

Combining these two equations, we can form a third relationship between the angles.

$\frac{dq}{db} = 4 - 2n\frac{\cos b}{\cos a}$

Let's set the derivative $\frac{dq}{db} = 0$, which will maximize/minimize the angle $q$ in terms of $a$ and $b$.

$4\cos a = 2n\cos b$

Let's multiple Snell's law by 4, square it, and add it to the square of this equation.

$16 \cos^2 a + 16\sin^2 a = 16n^2\sin^2 b + 4n^2\cos^2 b$

Noting that $\sin^2 b = 1 - \cos^2 b$ and $\sin^2 a + \cos^2a = 1$, we can solve for $b$.

$cos^2 b = \frac{4}{3}\big(1-\frac{1}{n^2}\big)$

We can then go back and find $a$.

$cos^2 a = \frac{n^2 - 1}{3}$

Now we can go back and find $q$. Unfortunately, there doesn't seem to be a particularly elegant way to write this out; it's a bit of a mess. So rather than writing the whole thing out, I'll just plot it for you here, including the dispersion relation for n.


You can see that we observe a deflection of about 3 degrees across the visible light, and that at the 600 nm, we get the "rainbow angle" of 42 degrees. At a rough estimate, if the rainbow appears to be 1 km away, then the red and blue light would be separated by 26m, more than enough to create the effect that we call a rainbow. Note that the example I'm doing here is a first-order rainbow--we can also make rainbows be counting further reflections within the droplet, and we'll see rainbows showing up at various other points. The method of calculation is pretty much the same.


And that is how we get a rainbow.