How many terms do we need in the exp series?

preview_player
Показать описание
The exponential function is expressed in terms of the series, but practically, how many terms do we need to compute it to some desired accuracy? Well, it turns out the answer to that is quite interesting.

cltoutofnowhere
and follow the instructions on the website. If you can't enter the website, watch the latest video! It always changes when a new video is up.

Sources:

Other than commenting on the video, you are very welcome to fill in a Google form linked below, which helps me make better videos by catering for your math levels:

If you want to know more interesting Mathematics, stay tuned for the next video!

SUBSCRIBE and see you in the next video!

If you are wondering how I made all these videos, even though it is stylistically similar to 3Blue1Brown, I don't use his animation engine Manim, but I use PowerPoint, GeoGebra, and (sometimes) Mathematica to produce the videos.

Social media:

For my contact email, check my About page on a PC.

See you next time!
Рекомендации по теме
Комментарии
Автор

[PREVIOUS PINNED COMMENT DISAPPEARED AGAIN]

A collaboration between Oscar and I was discussed 3 years ago, but it was not until about December 2022 that I realised that this could be a potential collaboration idea.

This is modified from a question from my Year 1 probability course. I still vividly remember this question because it was phrased like a problem in analysis, and it was very satisfying when I solved this.

mathemaniac
Автор

A collaboration between Oscar and I was discussed 3 years ago, but it was not until about December 2022 that I realised that this could be a potential collaboration idea.

This is modified from a question from my Year 1 probability course. I still vividly remember this question because it was phrased like a problem in analysis, and it was very satisfying when I solved this.

mathemaniac
Автор

Thanks for the collab this was a lot of fun!

OscarVeliz
Автор

Thank you for getting me familiar with Oscar's channel. Lovely video tho, very professional and high quality! 😊

kodirovsshik
Автор

Evaluating the series isn't that hard if you do it eight. For example you can compute the first 6 terms as The reduces the number of redundant multiplications and divisions.

rdbury
Автор

To compute large values of exp(x) I think it is a good a idea to split x in its integral and fractional parts (x = m + f, m = [x], f = x - [x])

Thus, we can
1. Compute e and exp(f) very well.
2. Use the binary exponentiation algorithm for the integral part of x: exp([x]) = e^m.
3. The final result is e^m × exp(f).

What do you think?

wendolinmendoza
Автор

Always wondered how to compare two functions on how similar they are. This video gave some ideas

minimon
Автор

To produce the table for m at 12:49, the CLT as stated in 10:16 is not enough. You need to quantify the convergence of distributions (aka Berry-Essen).
.
Though for the initial task of approximating e^x, I'd rather just use Taylor with remainder and bound the error, haha.

strikeemblem
Автор

Very interesting connection between probability and numerical methods

wendolinmendoza
Автор

13:11 Don't play stupid and don't take us for fools, please. Each factorial dont need to be fully computed from 0 for each term, because it's just a factor of the previously calculated denominator of the previous term of the sum. Integer multiplication isn't a big deal for computers.
*What actually is an issue to compute here are the division.*
Not only division is usually much slower than multiplication on most computers, but it doesn't end in the integer space and is very likely to produce results that cannot be represented with limited precision. To prove that the computer mitigate division errors in the sum with known precision is much more difficult than to compute factorials !

emjizone
Автор

Surely we shouldn't need more than 2. 1 + x is a good enough approximation, right? :P

More seriously, it's probably best to optimise around n = π, since most exponential calls that actually need to be fast are likely sine/cosine/complex exponential calls. That said, does this method of approximating the precision world when the exponent is imaginary?

angeldude
Автор

I actually thought about this a little bit some years ago without knowing it was related to the Poisson distribution, while solving a Project Euler problem! (problem 697, for those curious) Great video!

johnchessant
Автор

We could use things like series convergence accelerators (Shanks, Pade) to dramatically limit the number of terms

bogdannn
Автор

I have another question, with X is a random variable, P(X <= m) is a probability, but we concern a bout accuracy which is T[n]/e^x where T[n] is Taylor approximation with n first element, it so ambiguous to use a probability to explain a accuracy, what kind of relation between them ? I just see you show that it is the same in formula but not explain why we can use a probability to measure accuracy.

NapstaNG
Автор

You could also skip some early terms once x gets big enough, because those early terms contribute such a small amount to the relative error.

Of course, this is all just an exercise in algebra anyways, because adding taylor series terms to approximate an exponential is terribly inefficient as a computational method.

jrkirby
Автор

If we decide to limit the absolute error instead of the relative error though, I think we can have a much simpler approximation, right? We can consider the terms where, say, n>2|x|+k where k is a small integer and also where the term itself is small and then the whole tail can be bounded by geometric series times something small. Or is the bound just going to be crappy?

artliss
Автор

Can't you just use the Lagrange remainder?

torgeirHD
Автор

How much closer do you get to the answer, ie how much more accurate does the approximation become if you divide the truncated series by 0.99? I suspect it will suddenly become far more accurate. Also for large n, you can replace n! with an asymptotic expression. I realize it's not the point of the video, but its interesting.

DestroManiak
Автор

Fun fact out of this: 65/24 is the 99% approximation of e

joeeeee
Автор

around 3:00 how did i scale the width of the bars exactly? I tried to do similar approximations but got stuck around here

lueelee