# Unexpected behavior of FindGeneratingFunction

FindGeneratingFunction will give up to computer sometimes?Such as

FindGeneratingFunction[{1, 4, 6, 4, 1}, x]


But actually the $1 + 4 x + 6 x^2 + 4 x^3 + x^4$ is expected.As the same GeneratingFunction will give up to compute.

GeneratingFunction[Binomial[4, n - 1], n, x, Assumptions -> 1 < n < 4]


Or I have a misunderstand this two function?

• Compare FindGeneratingFunction[{1, 4, 6, 4, 1, 0, 0, 0, 0, 0}, x] and FindGeneratingFunction[{1, 4, 6, 4, 1, 0, 0, 0, 0}, x] with yours. Also, it appears that by definition n runs from 0 to Infinity, so perhaps your use of Assumptions is ignored. – Michael E2 Apr 17 '16 at 16:01
• @MichaelE2 Wow,you have done it.And do you mean the GeneratingFunction is unsuitable here?Another suggestion that I think you should post the comment as answer.I will accept that,I think it can help some friends.The documentation have no this aspect specifcation after all. – yode Apr 17 '16 at 16:08
• You may also specify the function space you want FindGeneratingFunction to explore: FindGeneratingFunction[{1, 4, 6, 4, 1}, x, FunctionSpace -> "Polynomial"] returns the polynomial you expected. – MarcoB Apr 17 '16 at 19:49
• @MarcoB Wow~Magic!!Can you post it as an answer? – yode Apr 18 '16 at 5:27

You can "help" FindGeneratingFunction by specifying the function space you want it to explore:
FindGeneratingFunction[{1, 4, 6, 4, 1}, x, FunctionSpace -> "Polynomial"]

This returns the $1 + 4 x + 6 x^2 + 4 x^3 + x^4$ polynomial you expected.