Can you take the train from the Glasgow airport to Edinburgh, near the Royal Mile area? If so, should it be booked in advance? Is the bus much less expensive?
No, no, and yes.
There is no train service from Glasgow Airport in to Glasgow. You'd need to take a bus (express bus #500) or a taxi to Queen Street Station in Glasgow, where you can take the train to Edinburgh Waverley. The train station (Waverley) is downhill from the Royal Mile (actually it's downhill from everything!), so if you have a lot of luggage, you'll need a taxi.
You don't need to book the train in advance, and you can sit in first class even if you only pay for a standard seat. The trains are very comfortable, and have food service (a food trolley comes through).
The bus would be cheaper, but the bus station in Edinburgh is farther away from the Royal Mile. Personally, for the difference of few pounds, I'd take the train. Scenery's much better from the train, too. If you take the train that runs through Falkirk, you can see the Kelpies from the south side of the carriage. Those trains take about 1 1/4 hours; the more direct trains take about 50 to 55 minutes.
Hope that helps.
Just want to add that this is really easy to do. You can get a ticket at the information booth in the baggage claim area. And if you miss that you purchase it on the bus. It's really easy and the trains between Glasgow and Edinburgh are frequent and reliable unlike the systems we face in NYC. :(
I've done the bus and it was probably ten pounds cheaper and it runs more often (every hour I believe). I went to the bus station, bought the ticket, and hopped on. The ride was pretty fast. However, I did not know where to get off and rode all the way to the bus station. I should have got out on Princes St. (second to last stop) because it would have been a little less of a walk. And yes, everything is uphill to get to in Edinburgh. I just accepted that fact and walked everywhere. As long as you do not have massive luggage you will be able to simple walk straight up hill to the royal mile and it shouldn't take you any more than 15 min.
As a previous poster noted, the bus/train does not run from Glasgow airport to Edinburgh. You need to get into town either by the airport bus or taxi first.