Translate

Thursday, November 19, 2015

Approximating sqrt(3) for fun

Of course you can calculate square roots easily but some people like to play with math for fun, or even to test out things. And I just feel like putting this thing up, as it's one of my discoveries and it's my blog.

sqrt(3) approximately equals xn+1/yn+1, where:

xn+1 = 97xn + 168yn

yn+1 = 56xn + 97yn

and x0 = 1, and y0 = 0;

So yeah, you can plug that into some code and iterate. You can see at the start is 97/56 which is a bit over 1.732. It can take awhile so let's jump to some values where it looks more impressive.

Does an n exist for: x = 1351, and y = 780?

I'm thinking yeah, but don't know what it is. I play around with math a lot and got to this result some place or other so don't know what n is. If you wish to figure it out and put in comments, thanks!

With those then: xn+1 = 262087, and yn+1 = 151316

And 262087/151316 equals approximately: 1.73205080758

Correct for sqrt(3), same number of digits: 1.73205080756

And differs from sqrt(3) by approximately: 1.26e-11

That pc calculator is so handy. Keep doing iterations though and you'll get beyond it soon enough.

Oh yeah, negative DOES work. Just been kind of sloppy, and just talking the positive, so you can start with: x0 = -1, and y0 = 0

And found that with my own discovery.

If you want to know the tool used, search on: binary quadratic Diophantine iterator

When I get really bored or just want to feel better about myself I use something I introduced to the human species, usually math.

So no, not known officially and you can't find in any established mathematical text unless they snuck it in there without telling me.

I made that up. You discover things you get to name them. It's fun. Links go to my math blog. I called it Some Math.

To find it? Of course, just search on--some math.

Yeah, it's like that. In a pump myself up mood today. And here is how I do it.

And you know what? I actually DO feel better now! Am so glad that actually works. Sometimes I just need something to make me feel better, you know?


James Harris
Post a Comment