## Archive for December, 2012

Someone asked me the url of the youtube video I mention on my previous blog, so here it is. I am not that great in mandarin plus he talked really fast in the video. I only understand what he wrote on the paper and maybe one-tenth of the words that came out of his mouth. ðŸ™‚

## approximating square root of nature numbers with Pell’s equation

Posted: December 21, 2012 in MathematicsThis post could be my last post before the world ends, or it could be the celebration for “Hey, we are still alive in the day of doom”.Â Last night after I had the last hotpot supper with my friends and a nice sauna at the gym I went home and continue working on my project, but instead I watched youtube and I stumbled upon on an interesting video talking about Diophantine equations and Fermat’s method of ascent.Â In the video, he illustrates how to find integral solution of Pell’s equation by Fermat’s method of ascent.Â And now I am going to investigate further on Pell’s equation.Â In Diophantine equation, we only find solution in integers.

**History of Pell’s equation:**

So what is Pell’s equation?Â There is an interesting story about it.Â The equation was named after a mathematician John Pell who didn’t study it.Â Euler mistakenly confused William Brouncker, who was the first European studying the equations of this kind, with John Pell.Â Pell’s equation is any Diophantine equation of the form:

where is any positive integer which is not a perfect square.Â Why can’t be a perfect square?Â If it is a perfect square, then there exists such that .Â Contradiction, since the difference between two perfect squares cannot equal to 1.

**Method of solving Pell’s equation:**

Solving Pell’s equation sometimes isn’t really that difficult.Â Let’s say you wanna solve the Pell’s equation

.

The trivial solution would be and .Â But can you find more solution?Â Yes, without any difficulty you should be able to spot another solution of .Â Then the next question is:Â Is there more solution?Â And how to find them?Â In fact there are infinitely many solution to this Pell’s equation.Â They can be found by the following recursive formula:

So, if

then

To check it, let’s plug them back to the equation,

So indeed it works.Â To show that it always work, we need to plug in the and the

Now you may ask “How to figure out the coefficient of 3 and 4 in or 2 and 3 in ?”

**Here is how you find them:**

Let Pell’s equation

with non perfect square .Â If is particular solution such that

,

then let

where

then

then collect like terms and comparing with

hence

then

Now if , then

Therefore,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So for

then

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If we divide both sides of the equation by , we have

As

Therefore we can approximate square root of any non-perfect numbers by Fermat’s method of ascent on Pell’s equation.

For example, to approximate , takes

———————————————————————–

Let’s do one more,

Consider

Since

then

becomes

More iterations will achieve better approximation.

I think some of you may have seen many 0=1 proofs already.Â Today I am going to show you another one.Â So let’s begin.

**Theorem:Â 1=0.**

**Proof:**

Just for fun let’s integrate ,

Next we let,

Integration by Parts then give us,

Subtract the integral from both sides, we have,

add 1 onto both sides of the equation, and therefore 1=0.

Of course everyone knows zero can’t possible equal to one, but can you find where the error is? ðŸ˜€

I have just found out that not every four years there is a leap year. It maybe true for my lifetime and probably yours, but it may not be true for your kids or grandkids.

Before I go any further, I have to define what a leap year is. A leap year is when there is a Feb 29th in the particular year. For those years that do not have Feb 29th are called common years. The reason that a leap year has an extra day (366 days) is that the planet Earth rotates around the sun in approximately 365.242374 days. So that’s about 365.25 days. And if you multiply this number by 4, you will get an extra day every four years.

So this is how we were taught in elementary school that whenever the year is a multiple of 4, it is a leap year. For example, year 2000, 2004, 2008, 2012, etc all have the leap day Feb 29th. But if you look further beyond the calendar, you will find that there is no Feb 29th in the year 2100. You can check it in your electronic devices like laptop or iPhone. Certainly 2100 is a multiple of 4, and if you keep adding a 4 in the sequence 2000, 2004, 2008, …, etc; 2100 is in the list. So what the hell is happening?

I looked that up in wikipedia, this is what I found out in pseudocode:

`if year modulo 400 is 0 then`

is_leap_year

else if year modulo 100 is 0 then

not_leap_year

else if year modulo 4 is 0 then

is_leap_year

else

not_leap_year

In simple English, usually every 4 years is a leap year except for those years that are a multiple of 100 but not a multiple of 400. For example, 2100, 2200, and 2300 are multiple of 100, so those are considered common years. The year 2000 is a multiple of 400, so it is still considered a leap year and so as year 2400. If you can live that long, you will witness 7 consecutive common years: 2097, 2098, 2099, 2100, 2101, 2102, 2103.

Certainly I will be dead by then. But maybe our kids or grandkids can live through the year 2100.

What equals to 100% in life?Â How to get that extra one percent?Â Here is a little math that might help answering the questions.

Suppose A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z are represented by 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26.

We have,

H-A-R-D-W-O-R-K

8+1+18+4+23+15+18+11=98%

and

K-N-O-W-L-E-D-G-E

11+14+15+23+12+5+4+7+5=96%

but

A-T-T-I-T-U-D-E

1+20+20+9+20+21+4+5=100%

then, look how far the love of god will give you

L-O-V-E-O-F-G-O-D

12+15+22+5+15+6+7+15+4=101%

Therefore one can conclude that while hard work and knowledge will get you close, and attitude will definitely get you there, but it’s the love of god that will put you over the top!