Gary Farber points to this Wired article about something called "Vedic math" - what that is, they never really tell us - which has some practical application if you're interested in quickly solving some arithmetic problems. Since the example given is presented more or less as magic, and since I believe in de-mystifying math, I feel the need to do a little explaining.
Here's the cited example:
Shetty did not know the original Sanskrit verses, but he did know how to crack the square of 85 in less than a second. "To find the square of any number ending with 5, just put 25 on the right-hand side," he said. "Take the number that precedes five. In this case it is 8. Add 1 to it. So in this case it becomes 9. Multiply 8 and 9. You get 72. 7,225 is the square of 85. It's easy."
100x^2 + 100x + 25
100 * x * (x + 1) + 25
Method two:
Notice in the example cited that you can express the number "85" as both "80 + 5" and "90 - 5". With that in mind, let x + 5 represent a number that ends in 5 (the number x is therefore a multiple of 10, such as 80). The expression x + 10 - 5 then represents the same number. The square of x + 5 can then be written as
(x + 5) * ((x + 10) - 5)
(x * (x + 10)) + ((x + 10) * 5) - (x * 5) - 25
(x * (x + 10)) + (x * 5) - (x * 5) + 50 - 25
(x * (x + 10)) + 25
Now, if you're like me, the next thing to pop into your head after working through this is "I wonder how it works in general". For example, what's the magic formula for squaring two number that end in 6? Using Method One, we square 10x + 6 to get
100x^2 + 120x + 36
100x^2 + 100x +20x + 36
100 * x * (x + 1) + 20x + 36
A little noodling around will show that for the cases of numbers ending in 6 through 9, the formula will always start with the 100 * x * (x + 1) term and will always end with the square of the last digit (36, 49, 64, and 81). The middle term will be 20 times the difference between that number and 5, multipled by the last digit. That means the middle term for the case where the number ends in 7 will be 40x (20 times the difference between seven and five, which is two, times the original digit which we represent as x in the formula), 60x for 8 and 80x for 9. The formula is the same for the cases of numbers ending in 4, 3, 2, and 1, except you subtract the middle term instead of adding it - e.g., the formula for squaring a number that ends in 4 is
100 * x * (x + 1) - 20x + 16
And our newest winner for Geek of the Week...
Chuck Kuffner, in the first ever unanimous vote!
(And may I now sheepishly admit that I found that post cool as hell?)
Posted by: Ron Zucker on August 16, 2004 12:51 PMThanks! I'm glad someone liked it. :-)
Posted by: Charles Kuffner on August 16, 2004 1:31 PMI liked it too. Here's a shorter explanation for the example given:
First, a well-known algebraic identity:
x^2-y^2=(x+y)(x-y)
x^2=(x+y)(x-y)+y^2
85^2=(85+5)(85-5)+5^2
=90*80+25
=7225
Although this method doesn't generalize to squaring numbers ending in 6-9 like yours, it can be used to calculate other products quickly. For example,
Posted by: Mathwiz on August 16, 2004 4:33 PM
34*36=35^2-1^2=1225-1=1224, 33*37=1221, etc.
its just mind blowing!!!!!!!!
i am in class xi.
i have,myself, found a formula for calculating squares of nos. ending with 1,2,3&4, between
0-209.
well yours one is a fantastic one.