10
$\begingroup$

This question already has an answer here:

Is there a built-in function that will find a general expression for the coefficient of the series expansion of a function?

Series will only give the explicit terms up to some order

In[14]:= Series[Exp[x],{x,0,10}]
Out[14]= 1+x+x^2/2+x^3/6+x^4/24+x^5/120+x^6/720+x^7/5040+x^8/40320+x^9/362880+x^10/3628800+O[x]^11

And GeneratingFunction works the other way:

In[15]:= GeneratingFunction[1/n!,n,x]
Out[15]= E^x

I'm looking for something like the inverse of GeneratingFunction: start with Exp[x] and get 1/n!. Does it exist?

$\endgroup$

marked as duplicate by J. M. will be back soon May 9 '13 at 5:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

18
$\begingroup$

In this case you can use SeriesCoefficient

SeriesCoefficient[Exp[x], {x, 0, n}]
$\endgroup$
  • $\begingroup$ Thanks! I can't believe I spent 20 minutes looking and I didn't see this ... For some reason I was convinced it's only for SeriesCoefficient[Series[...], ...]. $\endgroup$ – Szabolcs Mar 20 '13 at 2:49
6
$\begingroup$

There is another approach that sometimes works better (gives closed-form expressions rather than recurrence relations):

In[1]:= InverseFourierTransform[(-I k)^n FourierTransform[1/(1 + x^2)^Log[2], x, k] , k, x]
Out[1]= (2^(-1 + n - 1/2 Log[1/x^2])
      Abs[x]^-Log[2] ((-I)^
      n ((1 + n) x Gamma[(1 + n)/2] Gamma[
      n/2 + Log[2]] Hypergeometric2F1[(1 + n)/2, n/2 + Log[2], 1/
      2, -x^2] (n + Log[4]) - 
    2 I Gamma[1 + n/2] Gamma[
      1/2 (1 + n + Log[4])] ((1 + x^2) Hypergeometric2F1[(2 + n)/
         2, 1/2 (1 + n + Log[4]), -(1/2), -x^2] - 
       Hypergeometric2F1[(2 + n)/2, 1/2 (1 + n + Log[4]), 1/
         2, -x^2] (1 + x^2 (3 + 2 n + Log[4])))) + 
 I^n ((1 + n) x Gamma[(1 + n)/2] Gamma[
      n/2 + Log[2]] Hypergeometric2F1[(1 + n)/2, n/2 + Log[2], 1/
      2, -x^2] (n + Log[4]) + 
    2 I Gamma[1 + n/2] Gamma[
      1/2 (1 + n + Log[4])] ((1 + x^2) Hypergeometric2F1[(2 + n)/
         2, 1/2 (1 + n + Log[4]), -(1/2), -x^2] - 
       Hypergeometric2F1[(2 + n)/2, 1/2 (1 + n + Log[4]), 1/
         2, -x^2] (1 + x^2 (3 + 2 n + Log[4]))))))/((1 + n) 
       Sqrt[Pi] x Gamma[Log[2]] (n + Log[4]))

It also can be used to find repeated anti-derivatives.

$\endgroup$

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