14 ms·
The exponential function is a miracle
- hyperbovine 7y agoThis is a special case of a more general phenomenon: quite a lot of probability density functions (of which the exponential function is an example) can be expressed as alternating sums containing huge combinatorial terms. As if by magic, the result is always between zero and one. It’s actually a large headache for computations.
- lopmotr 7y agoYea, it's one thing to cancel out perfectly in theory but sums of numbers with big differences in magnitude aren't great for numerical stability.
- amluto 7y agoHuh? Probability density functions aren’t bounded between 0 and 1. Their integrals are exactly 1, but that’s considerably less interesting.
- anonytrary 7y agoFor example, the Dirac delta has an unbounded height and integrates to 1.
- mantap 7y agoTo be pedantic, the dirac delta is not a probability density function.
- anonytrary 7y agoThis isn't pedantic, it's irrelevant. It is a generalized density function. Whether or not it represents probability is up to the way you're using the function.
- hyperbovine 7y agoSorry, you are right, meant to say cumulative density function. (Or survival function, as in the case of exp(-x).)
- amluto 7y agoTrue, but this has never felt like math magic to me. Usually you come up with a magical function for the PDF or similar, and then normalize it so that the CDF has the right integral. That last bit is just drudgery, not magic. If you’re lucky, you can work with unnormalized distributions.
- lopmotr 7y agoThat doesn't really show that it's amazing. You could say the same about x-x=0, even for large x. Or about any converging series. Unless all of that is amazing too - I wouldn't know, not being a mathematician.
- AlEinstein 7y agoOn the face of it, if someone told me a series converged on a small value like -0.4, I wouldn't expect to encounter 43 million along the way. It's easy to dismiss things as uninteresting but HN is a forum for nerds and I'd conjecture that things like this are interesting for that group.
- wruza 7y agoHonestly, that was either too trivial, or underexplained for it to be a nerd-content. Maybe I’m watching too much pbs and numberphile, but nothing seemingly amazing here.
- mark-r 7y agoYou're obviously just jaded. I agree with the post, I'm surprised when a large list of seemingly random large numbers cancels out like that. The secret of course is that they aren't random, even though they appear so to the naked eye.
- boyobo 7y agoWrite down the first 50 terms of the series for e^{-x}. Go back in time and tell Pythagoras to plug in x=2,3,4,5,6,7,8,10,... Each of the terms is a rational number, and the each of the sums will be an extremely small rational number (numerator will be tiny compared to denominator). Don't you think Pythagoras would be impressed and mystified? Would he be able to come up with an explanation for this `coincidence'? Now try the same with with x-x. That's not going to impress Pythagoras.
- ridiculous_fish 7y agoYou gave two scenarios which are worth addressing: "x-x=0". Here we have two terms (x and -x). Their magnitude grows at the same rate, so it is not surprising that their difference is fixed and the two-term "series" "converges" to zero. "Any converging series." Consider the exponential growth function: e^x = 1 + x + x^2/2 + x^3/6 ... + x^n/n!. This grows fast, but we know that the factorial is super-exponential so the terms must approach zero for any fixed x. If the series converges (true though not obvious) then the value must increase very quickly. Now consider the exponential decay function. Unlike x-x, the terms are raised to different powers, so they grow at different rates. And unlike the exponential growth function, the series converges to zero in the limit. The "miracle" is not the convergence but how it happens: terms growing in opposite directions at wildly different rates. It's as if a lopsided spaceship chaotically fired rockets at full power in all directions, and happened to stay exactly still.
- GlenTheMachine 7y agoIt is’t the exponential function that’s a miracle, it’s the Maclaurin series. Think about it. The Maclaurin series says that in a very real sense, the value of a function at zero, and the value of all of its derivatives at zero, contains all of the information there is to know about it. Intuitively, this should be completely unexpected. Why in the world would the derivatives of a function evaluated at a single point tell you anything whatsoever about the value of the function arbitrarily far away from that point? EDIT: as mentioned below, this is not true of all functions, even all functions that are infinitely differentiable at zero. But it is true for very large classes of functions.
- obastani 7y agoThat's not actually true. There exist functions of a single real variable that have derivatives at the origin that are all zero, yet are nonzero. For an example, see the following: https://en.wikipedia.org/wiki/Taylor_series#Analytic_functions https://en.wikipedia.org/wiki/Taylor_series#Analytic_functio... Nevertheless, it is actually true that all complex differentiable functions satisfy this property, which is miraculous.
- GlenTheMachine 7y agoWell, sure. Not all functions are described by their Taylor expansions. But this very large class is. I agree, if the word “miraculous” applies at all in mathematics, then this surely is one.
- petters 7y ago> There exist functions of a single real variable that have derivatives at the origin that are all zero, yet are nonzero The function that is equal to 0 for x<1 and equal to 1 otherwise also satisfies this.
- messe 7y agoThe more interesting statement is: > There exist smooth functions of a single real variable that have derivatives at the origin that are all zero, yet are nonzero https://en.wikipedia.org/wiki/Non-analytic_smooth_function https://en.wikipedia.org/wiki/Non-analytic_smooth_function
- zests 7y agoThis is behavior that could be expected when you evaluate _any_ infinite Taylor series far enough away from where the series is centered. Denominators of a typical Taylor series are fixed and the numerators depend polynomially on x. The post is definitely an interesting observation. I would chalk the miracle up to Taylor series and analytic functions in general, however.
- stkdump 7y agoExactly. Imagine how their mind would be blown when evaluating sin(1000pi), which is exactly 0 with the taylor series of sin(x) centered around x=0.
- joppy 7y agoI guess the miracle is that the series converges everywhere. For example, the Taylor series for log(1 + x) only converges for |x| < 1.
- a-dub 7y agomeanwhile, i just thought it was cool that you could draw a line where it's slope was equal to it's value.
- foxes 7y agoThe exponential captures the idea of slowly perturbing an object by a small amount. Suppose you start with some object, perform some action on it, then add the result back to your original object. On a manifold you can't add objects together, but you can push your object a little bit along a tangent vector (think of the tangent vector just as the slope of a function at the point). If you just recursively do this operation, as long as the amount you push by grows smaller you end up at a well defined point. Effectively you have pushed a point 1 unit along a geodesic (locally shortest path). So you can define the exponential map in much more generality as a Taylor series for more interesting things than just functions on R. For example given a (matrix) Lie group G and its Lie algebra (actually the tangent space at the identity), the exponential map exp : g -> G is defined by its Taylor series exp(X) = 1 + X + (1/2) X^2 + ... (X is some n x n matrix).
- boyobo 7y agoEverything you said seems to be valid if you replace 'exponential' by 'f' where 'f' is any real analytic function.
- foxes 7y agoFirst of all I was capturing the defn exp(f) = lim_{n \rightarrow \infty} (id + f/n)^n, but yes there are lots of other functions you can define more generally. The exponential just comes up particularly naturally.
- boyobo 7y agoAh, I didn't realize that's what you were trying to say with the explanation at the beginning. Now your post makes more sense.
- kerkeslager 7y agoThis is such a weird thread. There are a bunch of people arguing about why their favorite math thing is more a miracle than someone else's favorite math thing. Nothing is surprising if you've seen it before. Let's just let each other be excited about our favorite math, okay? Euler's identity is the one that gets me: e^(i * pi) + 1 = 0 How can this be? The five fundamental constants are related!
- matt-noonan 7y agoYou mean the seven fundamental constants? e^(i * pi) + 1 = 0 * 17 * 42
- tus88 7y agoStill not sure what i and 17 are...
- AstralStorm 7y agoNumber i is the complex unit, but I've no idea about 17 either.
- deleted 7y ago[deleted]
- magicseth 7y ago17 is the favorite number of David Kelly, a mathematician and professor of Hampshire College. He loves it for a very large number of reasons. He was instrumental in creating a summer camp at Hampshire which has trained many young brilliant mathematical minds. (Including Vi Hart). Thus it has spread. http://www.vinc17.net/yp17/index.en.html http://www.vinc17.net/yp17/index.en.html
- oarabbus_ 7y agoYou can find such "collections" for numbers like 7, 8, or 13, even ignoring the integers 0-4, and 42 is obviously a reference to Hitchhikers guide, a work of fiction. Am I missing something?
- lacker 7y agoThis is a very poor description of this formula for e^x - it isn’t a miracle at all that it converges! It’s pretty simple. The numerators are x^n. The denominators are n!. For any x, the denominators grow faster than the numerators, so it’s no surprise that it converges. The ratio only starts shrinking when n > x but you can see that with high school math. Somehow all these largish random numbers manage to cancel out almost completely. No, they aren’t “largish random numbers”, it’s just the ratio between two series, one of which grows asymptotically faster than the other.
- Dylan16807 7y agoConverging isn't a surprise. This giant mishmash somehow converging near zero is a surprise, and getting something with e is even more of a surprise. Nowhere in the post does it express surprise about the fact that each series converges on something. Separately, "largish random numbers" is a perfectly fine way to describe the start of the series, which is the most important part for influencing what it eventually converges on. Somehow despite each series getting increasingly enormous before dropping back toward zero, the convergence point ends up less and less perturbed by those enormous terms.
- crystaln 7y agoThis seems intuitively obvious, not a miracle. Take every other element in a series that has any regularish omnidirectional trend, alternate addition and subtraction, and you are quite likely to end up with a zero convergence.
- lucaspottersky 7y agofor ages we've been adding the miracle tag for things we don't fully understand. just get used to it.
- boyobo 7y agoI'm not sure exactly what you mean here but there I can't think of an interpretation that makes your statement close to being true. e.g. 1+4-9+16-25+36-49=-26
- kazinator 7y agoBut this is the case for the polynomial approximation to just about anything. The individual terms yield wildly different numbers that cancel each other out, and individually they approximate the desired function poorly. As a joke, a few years ago I created a polynomial approximation for Fibonacci. fib(9) suddenly goes beserk and calculates the answer to life, the universe and everything! https://news.ycombinator.com/item?id=14331627 https://news.ycombinator.com/item?id=14331627
- meuk 7y agoYou should approximate it with an exponential function. Actually, the nth Fibonacci can be obtained exactly by rounding an exponential function: https://en.wikipedia.org/wiki/Fibonacci_number#Computation_by_rounding https://en.wikipedia.org/wiki/Fibonacci_number#Computation_b...
- kazinator 7y agoI'm well aware of the closed form for Fibonacci since my undergrad days. This was produced as a kind of joke. I simply took the first several, plus 42 thrown in, and fit them to an N-th degree polynomial.
- dschuetz 7y agoIt's beautiful math, yes. But a miracle? I don't know.
- thanatropism 7y agoI'm late to the party. But let me offer first the finite-differences linear equation A[n]=A[n-1]*k For A[0] = 1, the solution is the sequence 1, k, k^2, k^3, k^4, k^5, k^6.... If we let k be the complex number i, this becomes 1, i, -1, -i, 1, i, -1, -i, 1... As you can see, the introduction of imaginary parts extends the original idea of powers-of-k (which if real go exponentially to infinity if k>1 and to 0 if k<1) to an alternating oscillatory pattern both in the real parts 1, 0, -1, 0, 1, 0, -1, 0, 1 and the imaginary parts. What you're seeing there is almost the celebrated relationship between imaginary exponentials and sine functions. Now: that was the finite-differences linear equation. If instead we take the differential linear equation f'(x) = kf(x) we get the exponential function. Again, if k=i, you get oscillatory behavior.
- agumonkey 7y agoFrom my non mathematician view, it's not one function per se, but how they all fit together in an ideal framework.