Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Polynomials In Excel

  • Please log in to reply
2 replies to this topic

#1 cyman1964uk


  • Members
  • 12 posts
  • Local time:11:04 AM

Posted 03 December 2005 - 08:57 PM

This might be the wrong place for this post (a bit technical/mathematical) but here goes anyway. The polynomials (power series)

-1 + x - x^2 and
-x^2 + x - 1 (here ^ denotes "raising to the power of")

are mathematically equivalent. They have just been presented with the terms in a different order. In English, the first expression would read "negative one add x subtract x-squared" and the second reads "negative x-squared add x subtract 1".

There is NO NEEED to use brackets here to make these two expressions equal. They already are.

Now, in Excel, follow these steps:

1) Put the value 2 into cell A1 (Press RETURN)
2) Type the following into cell B1:

=-1+A1-A1^2 (RETURN)

3) Type the following into cell B2:

=-A1^2+A1-1 (RETURN)

You will find the value in cell B1 is -3 and that of B2 is 5. Shouldn't these two answers be equal? Which one (if any) is correct? Any views?

[Please don't introduce brackets to force answers to be the same or for any other purpose ... I'm trying to prove a point here and the two expressions ARE the same mathematically WITHOUT BRACKETS.]


My Webpage
My Online Storefront

"If you declare that you can create a machine that will peel a potato, he will proclaim it impossible ...
Yet if it peels a potato before his very eyes, he will say it is useless since it cannot slice a pineapple!"

Posted Image

BC AdBot (Login to Remove)


#2 Rimmer


  • Members
  • 2,159 posts
  • Location:near Sydney, Australia
  • Local time:02:04 AM

Posted 04 December 2005 - 04:24 AM

Actually I don't think your two expressions are the same mathematically. Well okay maybe the mathematical expressions are but the Excel expressions are not - there is an ambiguity in starting an expression with -x^2 and it requires some reading of the fine print to determine whether this is interpreted as -(x^2) or (-x)^2.
Whatever you prove I don't think your going to change Microsofts mind on this.

Soltek QBIC, Pentium 4 3.0GHz, 512MB RAM, 200GB SATA HDD, ATI Radeon 9600XT 256MB, Netgear 54Mb/s WAP, ridiculously expensive Satellite Broadband
Windows XP Home SP2, Trend Micro Internet Security, Firefox, Thunderbird, AdAwareSE, Spybot S&D, SpywareBlaster, A-squared Free, Ewido Security Suite.

#3 Dan Brewer

Dan Brewer

  • Members
  • 46 posts
  • Local time:10:04 AM

Posted 08 January 2006 - 12:55 PM

Cool post! It was a nice brain teaser for a Sunday morning.

Actually, these expressions are not the same.

Please recall the order of operator preference (parentheses, exponent, multiplication, division, addition, subtraction).

The experssions would be solved this way:

Expression 1
if x = 2
-1 + x - x^2
No parentheses to consider
Solve for the exponent: 2^2 = 4
No multiplication to consider
No division to consider
Solve for the addition: -1 + 2 = 1
Solve for the subtraction: 1 - 4 = -3
Solution = -3

Expression 2
if x = 2
-x^2 + x - 1
No parentheses to consider
Solve for the exponent: -2^2 = 4
No multiplication to consider
No division to consider
Solve for the addition: 4 + 2 = 6
Solve for the subtraction: 6 - 1 = 5
Solution = 5

Thanks again!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users