Alon Amit on Quora · 2018-08-10

Can anyone explain in layman's terms where the Taylor series comes from? Why and how does it work so well?

= I’m sitting in my car.

= Good for you.

= Can you tell me where I’m going to be 5 seconds from now?

= Um, no. How could I?

= You can ask me questions.

= Fine. Where will you be 5 seconds from now?

= Bzzzzt! You can’t ask about the future. I’m not clairvoyant. You can ask about right now.

= Alright, where are you right now?

= Right at the south entrance of the Golden Gate Bridge.

= Great. How fast are you going, and in which direction?

= 30 mph, northbound. There’s some traffic, and I’m in the US so I use an ancient, silly unit for measuring distances and speed.

= Cool. Do you have your foot on the gas pedal or the brake pedal?

= Gas pedal. I’m currently accelerating at about 3 mph per second.

= Alright. Five seconds from now you’ll be about 83 meters into the bridge (I’m using normal people units), depending slightly on whether you keep a steady acceleration, increase it, or let go of the pedal. Of course, if you hit the brakes suddenly, all bets are off.


This little dialog is what Taylor series are about.

Of all the questions you’ve asked me, which was the most important? The first one, of course. If you want to know where I’m at five seconds hence, the most important question is where I am right now. If I’m in Amsterdam, or Brisbane, or Ouagadougou, that’s going to matter more than any of the other details I provided.

This is called the zeroth order approximation. It’s the value of the function at the present point.

Next question was my speed. It was not just a number: you were actually asking me about my velocity, which is speed and direction. The GG bridge runs north-south, but if I had been on an empty parking lot you’d have needed an actual direction. After my location, the next most important piece of information is my velocity.

With that information, you can predict where I’ll be in 5 seconds with complete accuracy provided that my speed doesn’t change. Right? If I keep a steady pace and direction, I’ll be at known locations at any point in the future.

This is the first-order, or linear, approximation. Super useful, and sometimes all we have.

But cars don’t always keep a steady speed, do they. So the next bit of information you needed was how my speed was changing, which is acceleration (and steering, if I had changed direction). With that, you could refine your prediction: instead of 30 mph times 5 seconds which is 67 meters, you were able to add a quadratic correction term:

Position =

Current position +

Current speed \times time +

Current acceleration \times time^2, halved

This is called the second-order approximation, and it requires the rate of change of the speed, which is the rate of change of the rate of change of your position. That’s the second derivative.

We could keep going. The next term would have been the rate at which my acceleration is changing, which some people call “jerk” (but nobody actually uses that term [EDIT: that’s not true.]) This would add a further correction of jerk \times time^3 divided by 6.


This, in a nutshell, is the idea of a Taylor series. The value of a function at a future point (or a nearby input) can be better and better approximated by starting with its value at present, adding a linear correction which is the derivative multiplied by the time difference, adding a quadratic correction which is the second derivative multiplied by the square of the time difference divided by 2, and so on.

Taylor series work well when the functions involved are “well behaved”, meaning the next derivative up from the one you asked about doesn’t go haywire at the point of interest and in nearby points. This is why you needed to add a caveat around hitting the brakes. Of course if I merely hit the brakes I would still be within dozens of meters from your prediction, but if I ignited my photonic hyperdrive and changed my rate of acceleration ginormously, you’d have been quite wrong very quickly.

Taylor series are simply taking this idea all the way through. They are fantastically useful both in theory and in practice, and the underlying idea is simple: Every nice function (in a subtle sense) can be better and better approximated by constant, linear, quadratic or higher order polynomials, because polynomials are flexible enough to mimic everything closely over short distances.

Originally posted on Quora: https://qr.ae/pFmzU0