Wednesday, November 21, 2012

10 interesting facts I have learned from Physics

This post I will write about my favorite facts I have learned about Physics over my 4+ years of study.  I still have much to learn, but as of now these things really hit home with me.  They are in no particular order.  I want to make this post really "lamen." Meaning I made sure to keep math out of it.  I also excluded a lot of topics in physics that would require too much explanation   For example, Quantum Mechanics has many interesting things about it, but its concepts are so strange, many people wouldn't appreciate it.

What makes things solid? We don't actually "touch" anything!:

We all know what it is like to feel things, particularly solid objects. We touch them with our hands, or walk on them with our feet, and every time we get the same response, an equal an opposite force backwards, the object "feels" solid.

But what is going on there? If we zoom in extremely close between the atoms in our fingers or feet or what ever to the object we are touching we will notice something interesting.  As you probably know all atoms are made of a nucleus composed of protons and neutrons and are surrounded by a cloud of electrons. Solid objects are a neat array of these atoms called a lattice.  

When we go to touch anything, or walk on something, the outer electrons in the atoms in our hands or feet repel the outer electrons in the solid object. So technically nothing actually "touches" There is always a measurable distance between the atoms in our hand and in the table or floor or cat.  So "touch" is nothing more than the electrostatic repulsion between atoms!

To put this in perspective, this is the same force that makes water from the kitchen sink repel a freshly used comb. It also can be used to show just how weak the gravitational force is.  The entire weight of your body is being held up by the repulsion of the atoms in your feet.

So technically, when you are sitting in your chair, you are actually floating slightly above it, since the atoms in your butt can never "touch" the atoms in the chair.

How do Air-Conditioners make cold air?

For this one I need to first set up a scenario. Imagine you have a pan of water.  You put this water in an oven until it starts to boil.  As soon as it starts to boil you immediately turn the over up to 2 million degrees. Neglecting the fact that the pan itself would melt (imagine we have some super, indestructible pan), the water would still continue to boil, albeit much quicker, but it would still boil.  The question is, what is the temperature of the water while it is boiling?

Well water boils at 100 degrees Celsius and interestingly enough, this will be the temperature of the water! Even if the oven is 2 million degrees.  All the energy is going into transforming the liquid water into a gas and none of it goes into actually making the temperature of the water hotter.  So the water will stay 100 degrees no matter what the ambient temperature is.  The only way the water can increase temperature is when it ALL turns into a gas.

It doesn't have to be this way however, if we wanted the water to boil at a much higher temperature, we would simply increase the pressure in the oven.  This works because the air molecules are colliding with the water much more frequently and thereby causing them to stay together in a liquid state and not fly off into a gas.  So we have learned two things here.

1. When a substance starts to boil, it continues to stay at its boiling temperature no matter how high the ambient temperature is.  It continues to do this until all the substance turns into a gas.

2. Increasing the pressure increases the boiling point of a substance. And decreasing the pressure decreases the boiling point.

So what does this have to do with air-conditioning?  Well it works on the same principle! Without going into detail about how EXACTLY it works, here is the general idea.

Instead of using water, we will use a different substance.  We will use a substance called a refrigerant, people know this as "Freon" but this is not correct since "Freon" is the name of a company that makes the refrigerant.  The most common type of refrigerant is called R-134a.

So what makes something a refrigerant?  The fact that its boiling point is extremely low (as well as having many other properties).  R-134a has a boiling point of -15.7 degrees Fahrenheit, meaning it would be a gas under normal atmospheric conditions.

An air conditioner pressurizes R-134a to a very high pressure. As we learned, this will raise the boiling point.    It can be raised so much that above room temperature it is in a liquid state.  The air-conditioner then rapidly drops the pressure, this consequently causes the boiling point to go back to -15.7 F.  But remember, when something is boiling, it STAYS at its boiling temperature no matter how hot the outside is.  So all the refrigerant suddenly becomes -15.7F.  This rapid cooling of the refrigerant causes the air around the refrigerant to be cooled considerably by convection, and a fan then blows this air out.  This is the cold air we feel!

Time can travel slower for some than others:

A lot of my favorite things come from Einstein, and this is one of them.  Among other things, Einstein discovered that time is not constant. (He called it "Time Dilation")  Meaning that it is possible for time to travel slower for some than others. But what is the factor that determines how fast or slow time travels?

The answer to that is speed.  The closer an object travels to the speed of light, the slower time travels.  Interesting scenarios can be made from this fact.  For example, the "Twin Paradox" is one such famous example.  If you took two twins, and put one in a rocket ship that traveled at 99% the speed of light and let the other stay on earth, then in 70 years the twin in the rocket ship would only be about 10 years older! So you would have two twins, one 60 years older than the other!  Time travels roughly 7 times slower for the twin in the rocket ship.

One interesting fact about this is, we need to use Einsteins corrections in satellites orbiting earth.  While these satellites are no where near even 1% the speed of light (about 11.2 kilometers per second), there is still a small amount of time dilation and this small error would be enough to make our GPS devices not work correctly on Earth.


Electricity travels quite slowly:

Any Physicist would look at this title and be confused as to what exactly I mean by "electricity." It is a very broad term.  Because certain aspects of electricity travel quite fast, for example when you flip the light switch, the light turns on immediately, what is traveling slow there? Seems pretty fast right? Well you are "kind of" correct.

When any circuit is completed, (as in flipping a light switch) an electric field is generated.  This electric field originates from the voltage source the circuit is powered by, be it a battery or an outlet in the wall. (Doesn't matter if it is AC or DC.)  This electric field pushes the electrons in the wires and this creates the flow of electricity. Electricity is nothing more than the movement of electrons.

So what moves slow? Well when you flip the switch, the electric field propagates extremely quickly.  In fact, the electric field generation and propagation is close to the speed of light.  But remember this field pushes electrons, and the flow of electrons is what electricity is.  The problem is, while the electrons are moving, the atoms in the wire get in the way.  This consequently causes the electrons to collide with the atoms and get redirected, many times even in the opposite direction! But since the electric field is always pushing forward, their average movement is forward.  But because of all these backward collisions, the average rate the electrons move is actually EXTREMELY slow.  On the order of a couple centimeters per second.  The reason why, say a light bulb, illuminates very quickly is because there is already atoms in the filament of the bulb and the electric field causes them to move.  It is the local movement of the electrons in the filament that causes the light bulb to illuminate. Depending how long the wire is from the power source to the bulb it could take over an hour or more for the electrons to go from the power source to the light bulb!


Getting shocked by a door knob and by lightning are the same thing:

We have all been shocked before.  Whether it is by a new sweater or a door knob.  The interesting thing is that the same physical laws that cause this shock are the same laws that cause lightning.  

When we get shocked by a door knob or anything else in daily life, it is because some time in the day we build up charge from rubbing and sliding on different substances.  So our body now has an accumulation of charge.  When we touch something metal that has also been rubbed on, the metal object has a deficit of charge, while you have a abundance.  When you get close to the object the extra charge will "jump" through the air and onto the metal object, restoring both you and the object to a neutral charge state. Interestingly, this shock will be a few thousand volts!

Lightning works the same way.  Somehow (it is still not fully understood) charge builds up in the clouds. Scientists believe it has something to do with raising water droplets in the atmosphere and somehow this builds a charge.  Never-the-less, a charge is built up in the clouds.  Which means there is a charge difference between the ground and the clouds.  If this difference becomes high enough the charge will "jump" from the clouds to the ground, restoring both to a neutral state.  The only difference is that this is a MUCH MUCH higher scale than the door knob and will be likely to kill you.


Visible Light, Radio Waves, Gamma Rays, X rays, All the same thing!:

James Clerk Maxwell, with the help of Michael Faraday discovered that light is an electromagnetic wave.  An electromagnetic wave is a wave composed of oscillating electric and magnetic fields.  This is how they work.

Through the laws of electromagnetism, we have learned the following.
1. A changing electric field generates a magnetic field.
2. A changing magnetic field generates an electric field.

An electromagnetic wave is made when either an electric field or magnetic field is created. As the field is being created it is "changing" and thus, according to the laws above, will generate the opposite field.  So if we generate an electric field, it will immediately start generating a magnetic field.  But then this new magnetic field will start generating another electric field.  This continues indefinitely and creates a propagating wave through space called an electromagnetic wave.  This is what light is.  Here is an animation from Wikipedia of the process. (Really cool!) (Click the image to make it load faster.)
One color is the electric field and the other color is the magnetic field. (Wildly out of scale!)  Notice that they are perpendicular to each other.

This is light. But it is also radio waves, and X-rays and gamma rays and microwaves. In fact, all these are exactly the same thing! So why is visible light safe for us while gamma rays are deadly? It is because of the energy the wave carries.

Without going into the math, the energy in an electromagnetic wave is directly proportional to the wavelength of the wave.  Small wavelengths correspond to HIGH energy and low wavelengths correspond to LOW energies.  The only difference between light and gamma/microwaves/X-rays/etc is the wavelength of the wave. That is IT! 

How do Microwaves cook food? Are they radioactive / dangerous?

I see / hear it all the time.  People VASTLY misunderstand microwave ovens.  Many people will downright think these things are radioactive and dangerous.  How do these things magically cook our food while not heating anything up?

Well above we learned that microwaves (not the oven! The wave!) are an electromagnetic wave.  We also learned that the only difference between light and other forms of electromagnetic waves is the energy they carry (which translates into a different wavelength).  Here is the interesting part, microwaves have LESS energy than visible light! Meaning the light around you is more "powerful" than the microwaves in the microwave.  

A logical question might be, "Well if they are so weak, how do they make my food so hot?!"  Good question! It has to deal with the fact that they interact with water molecules.  All food contains water in it.  Water is known as a "polar molecule" which means it is not electrically neutral.  It has a positive side and a negative side.  When something is of this form, it is called an "Electric Dipole," or said to have a "Dipole Moment."  Since the electromagnetic wave contains an electric field, it interacts with the dipole moment of the water molecule and causes it to oscillate.  Any electromagnetic wave will do this to water but there is something special about a microwave...

Every object has a "resonance frequency" in which if you oscillate the object at that frequency it will shake so violently that eventually it might cause some major problems. Soldiers marching over a bridge have been known to collapse it because they were marching to the resonance frequency of the bridge.  This also has happened on bleachers of people tapping to the rhythm of a song playing.  The rhythm just so happens to be the resonance frequency of the bleachers.  Water also has a resonance frequency.  This frequency is exactly the frequency of a microwave.  So the reason why microwaves cook food and not light or another EM wave is because the microwave is at the "special" frequency that causes the water molecule to oscillate very violently.  This oscillation causes inter-molecular "friction" and this friction causes heat. (Just like the friction in rubbing your hands together causes them to get hot.)  This heat by the friction causes the food to cook.

This is why the parts of the plate that aren't touching food stay the same temperature and why the microwave itself does not get hot.  So it is not because microwaves are powerful or "radioactive" that causes them to cook food.  They simply are just at the "right" frequency to oscillate the water molecules in the food.

How do Motorcycles stay stable?

A common toy you can buy is a "gyroscope."  It is also a very interesting topic in Physics.  A gyroscope is caused by a rotating wheel about an axis.  Here is a picture of a toy gyroscope.
Anyone who has ever played with one of these will know it can have some very strange behavior.  While the wheel is spinning, the gyroscope will stay stable (as shown in the picture).  If you try to tip it over it will cause the gyroscope to turn and move in a surprising manner. The mathematics behind this are a little on the complicated side but it has to do with the fact that angular momentum is being conserved (not important for this article!)

The wheels of a motorcycle about their respective axis act as gyroscopes.  While the wheels are spinning it increases its angular momentum.  If you try to tip the motorcycle over, the torque you exert on the motorcycle will be translated into a turning motion.  This is why motorcyclists lean to make turns.

This is a very complicated situation to describe without the help of mathematics, but if you go buy one of these toys (they are like 2 bucks!) you can get a big understanding on how gyroscopes work.  They work based on the fact that the wheel is turning.  If the wheel starts to tip over, the rotating mass of the wheel "throws" it back upright.

The strange properties of gyroscopes also make motorcyclists employ the use of "counter-steering" in which, over a certain speed (about 10mph) they need to turn their handle bars the OPPOSITE direction of their turn.  For example, they would turn the handle bars left, to go right.

What Causes Magnetism? How are magnets made?

Everyone knows what a magnet is. We all know that opposite poles attract each other and similar pole repel each other.  Here are some questions..
1. What causes a magnet to have such properties?
2. What happens if you cut a magnet down the middle between the two poles?
3. Do we actually know WHY magnetic fields exist?

1. So let's answer the first one. What causes, say a fridge magnet to stick to certain types of metal?  To get the answer we need to go on an atomic scale and look at the electron.  Electrons have a certain property called "Spin" which emulates the spinning of charge. Due to the laws of electromagnetism, a moving charge crates a magnetic field.  So the "spin" of the electron causes it to create a little magnetic field.  Also known as a Magnetic dipole. If the spin is in one direction is creates a +- dipole and if it is in the other direction it creates a -+ dipole. (The "spin" of an electron isn't actually the electron spinning, it is actually a little more complicated than that, but for now, this interpretation works.)  In a material like metal (or any other material for that manner) all the magnetic dipoles from the electrons are all randomly oriented.  Therefore the average magnetic field when adding up all of them is zero.  In certain metals, the electrons in the outer shell of the atom are not bound like they are in, say wood.  So when a magnetic field is applied to them it re-orients the dipoles to all be in alignment.  The sum of all these dipoles creates a macroscopic magnetic field that we can feel when we play around with magnets.  When we go to stick these magnets on the fridge, the magnetic field turns all the magnetic dipoles in the metal in the fridge to be in the opposite direction of the ones in the magnet and thus creates an attraction.

This is how we make magnets.  Certain materials (ferromagnetic materials) retain the orientation of the magnetic dipoles more strongly than others.  So it is possible to magnetize these substances by simply applying an external magnetic field.  Interestingly enough, you can also reverse the process by adding heat.  This causes the atoms in the material to oscillate violently and re-randomize the magnetic dipoles.

2. This is very interesting.  When you cut a magnet down the middle of its poles, it will create two smaller magnets with two poles.  It is impossible to have one magnetic pole isolated, they ALWAYS come in pairs.

3. The simply question of "Why do magnetic fields exist?" to this day is still not answered. We know HOW they work in incredible detail, but we still do not know WHY!

What is Gravity?

I saved this one for last because it is the most complicated.  It again is from our good friend Einstein.  When Newton formulated his equations and laws of gravity he himself said that he has no idea what gravity is or why it exists, but he can explain how it works.  Einstein answered this question.

The following ideas are very complex and require a very extensive imagination to visualize.  Einstein states that space and time are not two separate concepts but rather, interwoven together to form a four dimensional "space-time."  Where three dimensions come from our world we live in and the fourth dimension is time.  Think about it, if I say "Ill meet you in the parking lot."  I gave you a place, but not a time, you need more information.  Conversely, if I say "Ill meet you at 5:00 PM."  Again, not enough information, I gave you a time but not a place.  Therefore it only makes sense that in order to describe something completely we need both a spacial component ( 3 dimensions) and a temporal (or time) component. (Adding an extra dimension.)  When any mass is in this "space-time" it causes it to warp and bend, altering the paths objects take from straight lines to curved ones.  The earth travels around the sun because the space-time "fabric" is being bend and earth is simply stuck in it and follows the bent space time.

Since space and time are linked together, if space can bend, so can time.  The rate of time slows down the higher the gravitational force you are in.  This means time travels slower on the sun than on Earth because the sun has much more gravity.  The reason why a ball falls to the ground is because the space the ball is traveling in is being curved downward and the ball is simply following this curvature.



Wednesday, November 14, 2012

Deriving Boltzmann's Constant

This is one of those really simple things that is still really cool to learn.
Starting from the ideal gas law..
Where P is the pressure, V is the volume, n is the number of kilomoles there are, R is the gas constant and T is the temperature.

We will first start by dividing by Avogadro's number and assume we have one kilo-mole of gas. (Meaning n=1)

So the energy per-unit molecule is E=kT.

Saturday, October 20, 2012

Integrating Using Trigonometric Substitution

Normally I use this blog to post things that I am currently studying.  But recently I have discovered that my blog is receiving a good amount of page views via google.  So I from time to time I will be posting things that I feel as though people may need help with.

One such topic that came to mind is integrating using trigonometric substitution.  Over the years I have seen this topic taught by many professors and I have yet to see a way that I have liked, they all used methods of memorization instead of methods of logic. (I don't like to memorize things! It is much easier to remember the logic than formulas!)

I will present an easy to remember method of how to do trigonometric substitution.  So, lets start out with an example..

The trick to these integrals is to relate it to a triangle.  If we look at the Pythagorean theorem, we can put it in the form identical to the form in the denominator.
Thus, we know that the hypotenuse to our triangle (the variable c) is equal to x, and a=1.  So let us construct the triangle from this!
NOTE: The choice of which leg to put "1" is completely up to you. Since both "a" and "b" in the Pythagorean theorem can both be legs, it does not matter where you put it.  It will only change your substitution, not your answer.

So from this we see that..
Now that we have these relationships, lets plug it into our integral.
And that's all there is to it!  It all boils down to simply relating the radical term to a triangle using the Pythagorean Theorem.  You MUST remember to substitute for dx! A common beginner mistake is to forget about dx! You need to find dx by first establishing x, then differentiating it!  Let's do a couple more examples.
So a "tip off" that we need to use trig-sub is seeing the radical term.  We once again relate this to a triangle.  The radical is of the same form as the previous example so we know the hypotenuse must be 3 and one of the legs must be sqrt(5)*x
We can now draw some relationships from this and substitute into the integral.
Let's do one more "typical" example then we will use this for something more exotic.  For this one I will do much less explaining. 

We now relate this to the Pythagorean theorem.
We see from the Pythagorean theorem that one leg of the triangle is equal to 3 and the other leg is equal to x. (The choice of which leg goes where is up to you!)


For this last example, I will show you that you can use this technique in more places than just square roots.  This is something that I actually did at one point.  I couldn't remember the integral of 2^x and I didn't have anywhere to look it up. (Before I had a smart phone!)  So I did this to figure it out.
We can construct a triangle from this.  It need not be in the Pythagorean form.  You can do it in the following way.
From this we can draw trigonometric relations..
Pretty awesome!!

Conclusion:

These examples were some basic trig-sub examples.  They can get more complicated, as in having "x's" in the numerator as well.  But just approach them in the exact same manner and they should turn out okay!






Multipole Expansions

The Dipole:


Let's find the potential at point P due to these two charges.

The Quadrupole:

We now have the following setup..
We will once again assume P is very far away from the charges. It isn't shown, but the bottom line from +Q is r_a, the middle line is r, and the top line is r_b.

The General Case:

We now approach the situation in which we have N number of charges in three dimensional space.  We will use the law of cosines expression just as we did before and the binomial expansion.

Multipole Expansion in Cartesian Coordinates:

Recall that the direction cosines are..
We begin in the exact same manner as before except instead of using a binomial expansion we use a Taylor expansion. (Which is really the same thing!)
The monopole is a scalar, or a Tensor of rank 0. The dipole is a vector or a Tensor of rank 1. And the Quadrupole is a Tensor of Rank 2.







Friday, September 28, 2012

Quantum Mechanics: General Structure of Wave Mechanics and Operator Methods

(The following are my notes from "Quantum Physics" Chapter 5 and 6 from Stephen Gasiorowicz)

The Hamiltonian Operator:

The time dependence of the wave function is given by..
On the right side of the equation, the wave function is acted upon by the Hamiltonian Operator, it is an operator version of the total energy.
Where from here on out, we will represent operator with hats over them.
If the potential function has no time dependence, then the Schrodinger equation becomes separable and we get a relation for the function that describes the position.  The solution is..
Where E are the eigenvalues and u_E(x) are the eigenfunctions of the wave function.  Eigenfunctions that correspond to different eigenvalues are orthogonal, namely..

The eigenfunctions of H form a complete set, namely for any arbitrary square integrable function of x, one that satisfies the following..
may be expanded in terms of the eigenfunctions of H, so that...

Namely, we can write the wave function as a linear combination of its eigenfunctions.
These eigenfunctions can be multiplied by a constant to become normalized so the sum over all x of the same eigenfunction is equal to 1. (Because remember, this represents a probability!) If the eigenfunctions are different, the sum over all x will equal zero because as stated, they are orthogonal to each other. So it follows this condition..
Where we have used the kronecker delta function.
Since we have stated that the position wave function can be written as a linear combination of its eigenfunctions, the entire wave function, one that depends on both space and time, can be written as..
Energy is just one observable of a system, we also have momentum.  We recall (from a previous post of mine) that the momentum eigenfunctions are described by the following differential equation.
The momentum operator, like the Hamiltonian operator has real eigenvalues.  This is because it is a physically observable quantity.  Any operators with real eigenvalues only are called hermitian operators.

The Interpretation of the Expansion Coefficients:

From previous posts, at this point we know that...
Directly from the book, pg 97
1. The results of any given measurement can only be one of the eigenvalues.
2. The probability that the eigenvalue will be found, or, equivalently, the fraction of systems in the collection that will be found to have the eigenvalue a, is |C_a|^2.
3. After a measurement on a member of the collection yields a given eigenvalue a_1, for example, then that particular system in the collection must be projected by the measurement into the state u_(a_1)(x). Only in this way can we be sure that an immediate repetition of the measurement of the observable A gives the same result.

The value of the observable A for a system has any one of the eigenvalues is unity.  This means..
We can use this to prove an identity used in Fourier Transforms.
We know that...

We will now define a Hermitian conjugate operator denoted Q^+
For hermitian operators, we know that the expectation values must be real, so..
For any two operators A and B...

Degeneracy and Simultaneous Observables:

We will now discuss the condition for when the same eigenfunctions apply two operators.

The eigenfunctions u_a(x) corresponding to the operator A,
will be simultaneous eigenfunctions of another operator B when..
This implies that..
For one eigenfunction, this isn't very interesting, but if we were to sum this over all eigenfunctions..
So the condition for the same set of eigenfunctions to apply to both operators is, the operators must commute. (Remember, the above notation indicated the commutator of two operators.) 

Does the converse apply? If we have two hermitian operators, and they commute, does it necessarily mean that we will have the same set of eigenfunctions?
Under these circumstances..
So the function Bu_a(x) is also an eigenfunction of A eith eigenvalue a.  If there is only one eigenfunction of A that corresponds to the eigenvalue a, then we must conclude that Bu_a(x) is proportional to u_a(x).  We write this proportionallity as..
We can therefore conclude that u_a(x) is simultaneously an eigenfunction of both A and B.  We should therefore change the notation a little.
But what about the case when we have degeneracy? Namely, when we get more than one eigenfunction from one eigenvalue. So we have..
For these circumstances, all we can do is say that when B acts on either one of these eigenfunctions, it produces a linear combination of both of them.
This isn't a problem, we will simply choose a linear combination (that we will call v) such that...

Bra-Ket Notation (Dirac Notation):

(To anyone who may be reading these notes, this will not be an in depth look into Bra-Ket notation as I am already aware on how they work, I use this website for my notes and it would take too much of my study time to go into something that I already know a great deal about. I do this sometimes, but as of right now, time is of the essence!)

For the following relation,
The notation on the left hand side of the equal sign is called the Bra-Ket notation. (Get it? Bracket?)  The term with Phi in it is the Bra vector and the term with Psi is the Ket vector. For every ket there is a bra that is simply the complex conjugate of the ket function.  So since Phi is in a bra form, its notation in the integral must be the complex conjugate.  These vectors describe a state.

When an operator acts on a state it creates another state. We write this in the following way.
Where the left hand side represents the operator acting on the ket vector and the right hand side is simply a way of writing the resulting vector.

Another example of Dirac notation is..
Recall our definition of the Hermitian conjugate operator.
We will now examine the expansion theorem using this notation.
From the expansion theorem, a wave function can be written as..
We will now do the example in on page 109.

Show that the eigenkets of any hermitian operator are orthogonal to each other if the eigenvalues are different.

The eigenvalue equations read..
Thus the eigenkets are orthogonal to each other then their eigenvalues aren't equal to each other.

Suppose we ask: What is the probability that if we make a measurement of the position of the state represented by |psi>, we find the value x?
Since the position is an observable quantity, we can pretty much assume that it is a Hermitian operator.  We will denote this operator as X.  This operator will have a complete set of eigenkets, whose eigenvalues are the numbers x.
Using the expansion theorem, we can write..
We write this as an integral because x represents a continuous eigenvalue.
Using the orthonormallity of the eigenstates in the form..
We can calculate C(x') by multiplying the integral equation above by the x' bra vector.
The magnitude of the expansion constants |C(x')|^2 is the probability that a measurement of the position of the state |psi> yields the value x.  This is precisely the definition of |psi(x)|^2! So all we have to do is replace C with psi and change around the notation..
Similarly, we could show that the momentum space wave function for the state |psi> is..
We can now make several points:
The completeness relation in terms of the position eigenkets reads..
The unit operator can now be inserted at will, for example..
Consider..

Projection Operators:

We will not return to the interpretation of the expansion coefficients we developed earlier.  For simplicity, we will deal with discrete eigenvalues.
P is the projection operator because it has the property that when acting on an arbitrary state, it projects it into a state of |n>, with probability amplitude <n|psi>.  What we have shown above is that if we use the projection operator again, after first using it once then it changes nothing.  This is because when we take a measurement we force the system (using the projection operator) into one of its eigenstates.  Further measurement will only yield the same result, as it should.

If we were to write the average energy...
So we can write the operator H in terms of its eigenvalues and corresponding projectors.

The Energy Spectrum of the Harmonic Oscillator:

We first start by writing the Hamiltonian for the Harmonic Oscillator.
We introduce a special notation for the operators in the terms H -1/2(hbar)w is factored. (With an extra factor of 1/(sqrt(hbar)) to make them dimensionless. 
Thus A|E> is also an eigenstate of H, but with energy lowered by (h-bar)w.  Is we apply A- again to the state A|E> we again get another energy lowering.  This lowering can only go as far as the ground state. (The lowest energy level.)  We denote the ground state as |0>.  Because of this, we must write that A|0>=0.  Thus the ground state energy is..
It can be shown in the same manner that the A+ operator raises the energy level by 1.
The thing about these operator is that it does not keep the state normalized. We must therefore construct a normalization constant.
We see that A acting on any polynomial f(A+)|0> is equivalent to d/dA+ acting on that state.  Let us now consider  <0|A^m(A+)^n|0>.  This goes to zero unless m=n so we end up with..

From Operators back to the Schrodinger Equation:

Starting from..
We now see that...
We can also obtain the higher energy states by working out...
In the general Schrodinger Equation...
This is the Schrodinger energy eigenvalue equation!