Placing a railgun on the moon's surface would have the same problem... every time you fired a shot, you'd accelerate the MOON in the opposite direction.

Granted, this could be fairly insignificant because the mass of your projectile would be tiny compared to the moon's mass -- but it could also be fairly tiny compared to the orbital railgun's mass.

Either way, unless orbit is corrected, you're looking at a gradual degradation of orbit that eventually results in a burning, fiery collision with the earth or a freezing, endless flight into the far reaches of space.

It's basically a question of how much force your railgun uses to fire a round:

`The force (f) expended per shot depends on the mass of a round (rM), and the speed at which the round is fired (s):`

f = rM * s

`The effectiveness (E) of your railgun is determined by the force (f) used per round, and the total mass of the gun (gM) and whatever it is mounted on, be it a satellite or the moon. In the case of a lunar railgun, a low E means that the moon's orbit changes fatally after relatively few shots. A low E for an orbital railgun means that you need to expend a great amount of force to correct for orbit:`

E = gM / f

• CASE A: If your railgun requires relatively puny force to fire a round, an orbital railgun can correct its orbit without expending a great deal of energy.
• CASE B: If your railgun requires a huge amount of force to fire, your inability to correct lunar orbit will necessitate an energy-wasteful orbital railgun.
• CASE C: If your railgun requires force between these two limits, a lunar mounted railgun will be better.

All right... so how much force does your railgun use?

Either way, you're pretty much shooting straight down, and have a great distance to cover. Because this is a human killing device, it needs to be able to assassinate choice targets.

The profile of a human is very small from high above, and they move around a lot.

Therefor, your railgun needs to accelerate rounds to extreme speeds. The round needs to reach its destination very quickly -- a few seconds at most. This means that the s variable of your force equation is very high.

This is also a property destruction device. It needs to be able to destroy property. If it was just an assassination weapon, it could use miniscule rounds. At extreme velocities, these would be sufficient to rip through human flesh and kill the target.

Not so with buildings. Many of the space-age construction materials we use today would suffer little damage from tiny rounds, even at insane velocities. (To roughly understand this concept, buy a gun. Shoot yourself in the leg. Now shoot a brick wall. Observe differences in reaction, particularly bleeding. This is a bastardization of the railgun/property damage concept, but it serves to demonstrate.) By the time the railgun was operational, we'd doubtless see advances in railgun resistant building materials, as well.

The rounds, therefor, also need to be fairly large. This makes the rM variable of the force equation large, as well.

As you probably know, when you multiply two very large numbers, you get a really huge number. f is now a really huge number. As a result, the railgun's effectiveness is greatly reduced.

"But wait," I conveniently make you say, "doesn't the moon have a really huge mass, too?"

Yes, it does, but we're repeatedly (many things we want to kill) accelerating fairly heavy projectiles to extreme velocities. Not just "really fast" velocities, EXTREME velocities. Extreme is a concept difficult to illustrate, due to its general overuse. For our purposes, pretend that "extreme" is a term several thousand orders of magnitude more severe than you perceive it to be.... OK, got it? Yeah, THAT fast.

Would this be enough to significantly affect the moon's orbit? Maybe. Maybe not. I'm betting it would, but I haven't punched the actual numbers -- I'd need a railgun spec sheet to do that.

Lets say, for the sake of argument, that you're the hard to convince type. You've seen the moon, and it's pretty damn big. You aren't so sure about these 'extreme velocities' and these 'orders of magnitude' and these 'therefor' conclusions and all the damn variables.

There are other reasons why an earth orbit is a better choice than a lunar installment:
• Defense. A moon-based railgun can be seen with a telescope, and its location is extremely predictable. It would be much easier to launch an attack against a known area on the clearly visible moon (and if you miss, you have a good chance of hitting it with "splash" damage) than it would be to attack a satellite with an unpredictable orbit that could only be detected with advanced technological means.
• Target Opportunity. An orbital railgun can shift its orbit to arrive at any location above the earth in relatively little time. A lunar railgun has no control over its area of fire.
• Service and Resupply. Earth's orbit is a lot closer than the moon. An orbital railgun could also be outfitted with landing apparatus to return to earth when necessary.

Ok. So you have an extremely deadly, accurate railgun in orbit that is virtually immune to attack and can decimate any target, anywhere on earth, within a matter of hours. It is easy to resupply and maintain... but it's expending twice as much energy per shot as it actually takes to fire the round. "Please," I conveniently make you ask, "can't you tell me how to avoid this?"

Simple. Decrease the railgun's speed in orbit prior to firing. The earth's gravitational force will take affect, pulling the weapon in a frightening, horrible descent toward earth. When you fire the rail, the gun will be violently hurled away from the earth, back into orbit. (And even if something goes horribly wrong, your railgun's firing platform will land on and crush your target, incinerating it in a fiery crater of doom!) The gravitational pull might not negate the entire force of the shot, but it will negate a significant portion. Just make sure you have damn good heat shielding.

You can't do THAT with a lunar railgun, can you?

In response to The Custodian's response:
The Custodian's points are in italics, my responses in plain text.
• Shooting things down from LEO: While you have to calculate two orbits (you can do it right now, so it shouldn't be too tough with the computing power of tomorrow) to attack a lunar railgun, the travel time of your counter attack allows for course corrections or evasive maneuvers. The orbital railgun can employ stealth technologies to make it difficult to track, and alter its course to make it difficult to predict. A lunar railgun is immobile other than the predictable orbit of the moon (it doesn't even rotate relative to earth!), which makes it easy to track as long as your computer can handle orbital calculations. Stealth technology is useless for a lunar railgun.
• A lunar railgun uses less power: The moon is 240,000 miles away. LEO is 200 miles high. To hit a target in the same amount of time after firing, you need to expend 1200 times more energy, although it is somewhat less because of gravity. If you expend the same amount of energy, even with gravity, your reaction time will become so severe that the weapon will become useless against any mobile target.
• Size limitations:You can build a bigger railgun on the moon, but it HAS to be more powerful, because you're over a thousand times further away.

However, the greater time a lunar railgun has to react to an attack is certainly a valid point. While it would be much easier to initiate an attack against a lunar railgun, the railgun's defensive systems would probably have hours to identify, track, and neutralize the threat. An orbital railgun would have minutes, if that, and would probably have little ability to neutralize the threat, due to size limitations of the satellite. The defensive strength of an orbital railgun is the difficulty in detecting it, but if someone had tracking technology that eclipsed your stealth technology, you'd pretty much be in for it.

Basically, each railgun is more defendable against certain kinds of attacks. Any attack based on inferior tracking technology will be more effective against a lunar railgun, but most missile weaponry would be pitifully ineffectual against a burrowing lunar railgun. However, the moon could be nuked.

Also, while your railgun's construction and maintenance crew will have an easier time on the moon, you'll have an easier time resupplying the railgun if it is in LEO, and your resupply vehicles will be less vulnerable. Which railgun is better in this situation is also largely a matter of what technologies the opposition has.

Ok, one final response to The Custodian:
As far as stealth goes: Yes, firing the railgun will make you detectable, but only for a short time, after which you can quickly change course.

I fail to see, however, how a railgun could be used to attack Cleveland. You have a huge ammount of kenetic force in the shell, but it is a relativley small object. Even if you were firing rounds that were a foot in diameter, you'd still have problems doing much real damage to Cleveland. Either you're proposing to use frickin' huge rounds, or just fire a TON of them.

In my opinion, this negates the advantages of a railgun. The whole point is that you can fire extremley fast, small shells, basicaly allowing you to snipe any target on earth, from orbit. A single shot being capible of killing any human target, and a few shots able to rend sufficient structural damage to a building to make it collapse. If you're just bombarding an area, you'd be better off with conventional payloads (bombs), and conventional payload delivery methods (planes). A railgun, especialy a lunar railgun, has a relativley small and infrequent fire opportunity, which makes it a poor method of delivery for a bombardment-style attack, and, similarly, solid metal rounds are a poor payload for a bombardment.

In response to Helter:
The moon is 240, 000 miles away from Earth. Although gravity grows much weaker as distance increases, lets assume that the Earth's gravity does not, giving you constant acceleration of 32 ft/sec/sec until the projectile impacts Earth.

It will take your projectile 8900 seconds (2 hours, 28 minutes) to reach Earth. In the last second, your projectile will be moving 53 miles per second (3180 miles per hour).

This clearly fails to solve either of the problems with a propelled weapon. Firstly, there are too many possible variables for any computer to accurately calculate what will happen over the course of two and a half hours. Even if your computer could, the weapon would be useless for target assassination, especially since this figure assumes that there is no friction between the atmosphere and the projectile, and that earth's gravity is constant, neither of which are true. Earth's gravity would be orders of magnitude weaker near the moon, but presumably you could partially compensate by introducing a high (although not extreme) initial velocity.

Secondly, At a rate of 53 miles per second, your projectile would also suffer serious heat problems.

Clearly, the projectile does need some sort of heat shielding. No matter how your orbital destruction device is configured, the small, fast projectile will burn up. However, since we can build lunar railguns, we might as well throw around some buzz words (magnetically sealed plasma-suspended repulsion field) and solve the air resistance.

Although your weapon would be functional, it would be useless in killing any mobile target. The only advantage it would hold over a classic, orbital railgun is that you would need to expend less energy per shot. However, the massive calculations required (the earth will rotate quite significantly in two and a half hours) might make the total expenditure of resources about equal.