Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Rational function that approximates e^x

  1. Aug 2, 2014 #1
    Is there a rational function,not series, that approximates e^x
    for example (x+1)/(x+3)
  2. jcsd
  3. Aug 2, 2014 #2


    User Avatar
    Science Advisor

    What do you mean by "approximates"? A given function, rational or not, has a specific difference from [itex]e^x[/itex]. We can always find a function, for example by truncating the Taylor's series to a polynomial, that "approximates" [itex]e^x[/itex] to a desired degree of accuracy. The difference is that the series, [itex]\sum_{n=0}^\infty[/itex] does NOT 'approximate' [itex]e^x[/itex], it is exactly equal to it.
  4. Aug 2, 2014 #3
  5. Aug 3, 2014 #4


    User Avatar
    Science Advisor

    That is not at all the question you asked before. However, the standard Taylor's series for the exponential, [tex]\sum_{n=0}^\infty \frac{x^n}{n!}[/tex]
    is a very "rapid" approximation to the exponential.
  6. Aug 3, 2014 #5


    User Avatar
    Homework Helper

    Truncating the series after a fixed number of terms is not a good method of evaluating [itex]e^x[/itex] numerically for large [itex]|x|[/itex], since one loses precision from calculating the large values of [itex]x^n[/itex] and [itex]n![/itex] and the remainder may be large.

    To the OP: Woolfram gives a couple of continued fraction expressions for [itex]e^x[/itex]; truncating these will give you a rational function approximation. But it is better to use a library function for exp if at all possible.
  7. Aug 7, 2014 #6


    User Avatar
    Science Advisor
    Homework Helper

  8. Aug 9, 2014 #7


    User Avatar
    Homework Helper

    It depends what type of approximation you want. One common one is an approximation such that the function and its derivatives match the approximation up to some degree

    e^{-x}\sim P(x)/Q(x)\\
    P(x)=\sum_{k=0}^m \frac{(m+n-k)!m!}{(m+n)!k!(m-k)!}x^k
    Q(x)=\sum_{k=0}^n \frac{(m+n-k)!n!}{(m+n)!k!(n-k)!}x^k

    matches up to the n+m+1 derivative

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Rational function that approximates e^x