If I have the function $e^x$, I know that Mathematica can expand it using


However, let's say that I have the function, $1+x+x^2/2+x^3/6$. Is there a way for me to input this function into Mathematica and have it tell me that it corresponds to the series of $e^x$?

If there is, can Mathematica do the same thing for more complicated series and tell me that it is, for example, a product of two different functions?

  • $\begingroup$ Have you seen Sum[]? $\endgroup$ – J. M.'s torpor Aug 11 '16 at 18:08
  • $\begingroup$ It would have to recognise the pattern. This short sequence really isn't enough to say with certainty that it refers specifically to $\frac{x^n}{n!}$ $\endgroup$ – Feyre Aug 11 '16 at 18:14
  • $\begingroup$ @J.M. Sum would work, but wouldn't I need to recognize the pattern first? For simple functions, this wouldn't be too bad, but when I work with more complicated functions in multiple variables, it could get tricky. $\endgroup$ – user85503 Aug 11 '16 at 18:19
  • $\begingroup$ @Feyre If I had a longer sequence (maybe 100 or a 1000 terms), would Mathematica then recognize the pattern? $\endgroup$ – user85503 Aug 11 '16 at 18:20
  • $\begingroup$ As Feyre notes, you should also realize that just because you know the first few terms of a (Taylor, Fourier, Laurent, Puiseux, etc.) series does not mean you can easily recover the original function that produced them. You have to have determined some pattern… in any event, FindSequenceFunction[] may be of interest. $\endgroup$ – J. M.'s torpor Aug 11 '16 at 18:22

You need at least one more term for this specific example

expr = 1 + x + x^2/2 + x^3/6 + x^4/24;

seq = List @@ expr

(*  {1, x, x^2/2, x^3/6, x^4/24}  *)

t[n_] = FindSequenceFunction[seq, n]

(*  x^(-1 + n)/Pochhammer[1, -1 + n]  *)

Sum[t[n], {n, 1, Infinity}]

(*  E^x  *)

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.