Unable to simplify equation

• Sep 28th 2012, 01:51 PM
jonarmani
Unable to simplify equation
I have the function f(n) = n2 + (n2 - (n-1)) + (n2 - 2(n-1)) + (n2 - 3(n-1))

I tried pulling an "n-1" out like so:
f(n) = n2 + (n-1) [ (n2-1) + (n2-2) + (n2-3) ]

But when I run test cases on it against the original, it doesn't come out right.
I'm pretty positive I can't take an "n^2" out to simplify it.

Is that the simplest I can express that equation?
• Sep 28th 2012, 02:47 PM
Soroban
Re: Unable to simplify equation
Hello, jonarmani!

Quote:

I have the function $\displaystyle f(n) \:=\:n^2+ \big[n^2 - (n-1)\big] + \big[n^2 - 2(n-1)\big] + \big[n^2 - 3(n-1)\big]$

I tried pulling an "n-1" out like so:
$\displaystyle f(n) \:=\: n^2 + (n-1) \big[(n^2-1) + (n^2-2) + (n^2-3)\big]$ . Illegal!

But when I run test cases on it against the original, it doesn't come out right.
I'm pretty positive I can't take an "n^2" out to simplify it.

Is that the simplest I can express that equation?

Why not add the four polynomials?

$\displaystyle n^2 + (n^2 - n + 1) + (n^2 - 2n + 2) + (n^2 - 3n +3)$

. . . . . . . . $\displaystyle =\;\;4n^2 - 6n + 6 \;\;=\;\;2(2n^2 - 3n + 3)$
• Oct 1st 2012, 05:11 AM
jonarmani
Re: Unable to simplify equation
Thank you!!!