# How to simplify this expressions?

How to simplify this expression: $$f(x, n) = x^{(n)} - x^{(n-1)} - .... x^{(n-n)}$$ I don't need the final answer, just some clue for approach I can use. And this is the complete expression I want to calculate: $$x . (f(x-1, n)-1)$$

• What do you mean by "simplify"? HornerForm? Factored? Can you give more details? Is this actually a Mathematica question and not just a Mathematics question? If so, can you enter your functions in proper Mathematica syntax, properly formatted in code blocks? Commented Oct 3, 2016 at 18:19

Define the function f[x,n] as

f[x_, n_] := FullSimplify[x^n - Sum[x^i, {i, 0, n - 1}]]

(1 + (-2 + x) x^n)/(-1 + x)


Now calculate the expression:

x (f[x - 1, n] - 1) // FullSimplify

((-1 + (-1 + x)^n) (-3 + x) x)/(-2 + x)

• If you define f with SetDelayed you should use Evaluate: f[x_, n_] := Evaluate@FullSimplify[x^n - Sum[x^i, {i, 0, n - 1}]] Commented Oct 3, 2016 at 23:48
• @Bob Hanlon -- I'm not sure I understand the purpose of the Evaluate. Commented Oct 4, 2016 at 20:15
• -Clear[f] evaluate its definition and look at the saved definition of f using ?f without the Evaluate then with its use. Evaluate avoids repeated calculation of the closed form of the Sum. Commented Oct 4, 2016 at 20:23