Monday, October 5, 2009

Doing math (or not) with Alpha

One of the pleasant surprises of the Baker's Dozen exercise was Wolfram Alpha. It didn't always come up with a full answer, but when it did, what an answer! So when I was browsing the Astronomy Picture of the Day and wanted to do a quick calculation, Alpha was the natural choice.

The question in question: In a 16-year tour de force, astronomers from the European Southern Observatory tracked the orbit of several stars around the center of the Milky Way [unfortunately, the video link appears broken]. From this, they confirmed the existence of a supermassive black hole there and measured its distance, based not on some chain of inferences involving standard candles and such (which also works and gives a consistent answer), but by pointing a telescope and watching things move. For sixteen years.

My question was, how good a telescope do you need to do that? The stars in question were on the order of light-days from the core, and the core is about 27,000 light-years away. Doing back-of-the-envelope calculations in my head and picking 2 light-days for reasons I don't remember, I made that to be around .02 arcseconds (the calculations aren't that hard, since for that small an angle you can easily ignore trig). But do double-check, I thought I'd ask Alpha.
  • I say (almost correctly): arc tan (27,000 years/2 days). Alpha thinks I mean tan-1(27, (0 years/2 days)).
  • All right, take out the comma. Alpha says "Result: tan^(-1)(4927500)". Hovering over this I see the pointy hand indicating a link. So I click on it. Up comes a box that lets me cut and paste the text. Not quite what I was expecting. OK, so put that back into the entry box at the top
  • Ah ... now I get a lot of results. A huge long decimal expansion, a conversion to degrees saying 90 degrees -- oops, I meant 2 days/27,000 years, not the other way around -- and then a bunch of alternate representations, including a continued fraction, integrals with gamma functions and other such. Well, Alpha does have its roots in Mathematica ...
  • Fix the fraction, and try again, including the extra cut-n-paste. I get a similar display with a conversion to degrees: 1.163x10^-5deg. But I wanted arc seconds, so ...
  • tan^(-1)(1/4927500) in arc seconds. It offers me "convert tan^(-1)(1/4927500) to arc seconds" to paste in, so ...
  • For some reason I'm now getting back the same thing to paste in again. Before, I believe I got an answer in numbers.
Yeesh. I thought this sort of thing was Wolfram's bread and butter.

For comparison, here's the same exercise with Google:
  • arc tan (27,000 years/2 days) gives me a link to Did you mean: arctan (27,000 years/2 days)? Click the link:
  • arctan((27 000 years) / (2 days)) = 1.57079612 Now that's more like it. Fix the fraction and ask for the units:
  • arctan (2 days/27,000 years) in arcseconds gives arctan((2 days) / (27 000 years)) = 0.0418321722 arcseconds.
That wasn't so hard, was it? Alpha may have a great knowledge base and engine, but sometimes you just want a good parser. I still think Alpha's pretty cool in general, but surprisingly calculations don't seem to be its strong suit.

Now I just need to look up what kind of telescope you need to resolve hundredths of arcseconds (actually, you need considerably better to be able to plot the position of the stars in orbit and figure out the orbital elements, but at least it's a start). [Actually, you don't. 2 light-days is the closest point of a fairly eccentric ellipse. The full orbit is considerably bigger.][Alpha now has no problem with arctan((2 days) / (27,000 years)) in arcseconds, though it does think that 27 000 without the comma means 27 times 000 --D.H. May 2015]

No comments: