2
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Michael E2 Apr 17 '16 at 16:01
  • $\begingroup$ @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. $\endgroup$ – yode Apr 17 '16 at 16:08
  • $\begingroup$ 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. $\endgroup$ – MarcoB Apr 17 '16 at 19:49
  • $\begingroup$ @MarcoB Wow~Magic!!Can you post it as an answer? $\endgroup$ – yode Apr 18 '16 at 5:27
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.