Help - Search - Members - Calendar
Full Version: Polynomials In Excel
BleepingComputer.com > Software > Business Applications
   
cyman1964uk
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.]

... OVER TO YOU!
Rimmer
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.
smile.gif
Dan Brewer
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!
Dan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.