Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Higher order derivatives in everyday life?
231 points by ironSkillet on July 27, 2022 | hide | past | favorite | 161 comments
Hi all, I read a Bloomberg article today (https://www.bloomberg.com/news/articles/2022-07-27/fed-raise...) stating the following:

"Powell also said the Fed will slow the pace of increases [to interest rates] at some point"

This is referencing a 3rd derivative (loan obligation = base, interest rate = 1st derivative, change in interest rate = 2nd derivative, pace of changes in interest rate = 3rd derivative).

I was wondering if hackernews had any other interesting examples of higher order derivatives that one might encounter in everyday life.




"In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection."

-- http://www.ams.org/notices/199610/page2.pdf


Surely, "jerk" has been an issue in many presidential reelection campaigns — even, long before CREEP.


The derivative of "jerk" is clearly the "term limit".


This too!


Thank you for this!


During the Covid pandemic health officials occasionally used similar language: The rate of increase in new cases was increasing/decreasing...


During the COVID pandemic, I saw some truly magical statistics in our government (I am French).

I tried to understand some of their data but it was beyond my capacities - despite having access to some raw data. I do not think that the general population cared (the concern was rather on how to calculate 1 km from their house) but for someone who is allergic to bad statistics creating crappy results it was torture.


I used to work doing epidemic models, it was torture sometimes to see people abuse mathematical concepts (eigenvalues, r0, etc) when talking about covid


We had an expert one on TV answering questions, and one of the questions was the one I was burning to ask: "how do you know there are X infections per day"?

To what he answers "because we get data from pharmacies, doctors, etc. about cases"

- so how do you know that this is a total number? It is just the number of positive tests?

- yes, so we know the ratio and therefore can tell for the whole population

- so the number you provide is an estimate?

- no, the number of cases

(some time passed and then another question)

- when you extrapolate (they used a more human-friendly term), how do you know that the ones who come for tests are representative of the whole population

- ...

While I must say that our government reacted to the pandemic almost very well (except that they lied at the beginning), some of the experts they put ahead were ridiculous.


who was asking the questions?


It was a "round table" kind of show with experts from the government, academia, science journalists etc.

It was interesting because it raised the right questions but unfortunately dd not beiring any answers.


Oh, right! Yeah, in an Rt graph, any time the upward slope starts getting more gentle.


It cuts the other way with stock market earnings reports. There are blood baths when "profits are down" when actually profit growth is down on record profits.


Purely from a discounted cash flow/net present value standpoint, this does make sense. Changes in the growth rate of earnings massively affect NPV.


Given that these stocks are priced on their potential to grow and not on the assets they already have, that seems correct.


Yeah, this annoys me quite a bit, but I guess I was naive. I’ve recently started buying stocks from companies I think are really on a nice path for the future, I’m in the field of genomics so I think I have a nice view on novel developments, like Liquid Biopsies (blood based cancer monitoring and diagnostics)…

And indeed some companies report growth of up to 30%… and then the stock goes down because it is less than expected. I know it was going to be like that but it’s even more so than I expected it to be. It feels… annoying.

Same with Beyond meat, they strike some deal with McDonalds, feels like a big deal, the stock does… nothing :s.


As John Maynard Keynes said, it doesn't matter what you as an investor think of a stock, or what you think other investors will do, or what other investors think you will do, or what other investors think other investors will do, what matters is what other investors think other investors think other investors think other investors will do.

"And there are some, I believe, who practice the fourth, fifth and higher degrees."

https://en.wikipedia.org/wiki/Keynesian_beauty_contest


Because Beyond Meat is overvalued right now.

- It's trading way beyond its revenue and losing lots of money.

- The McD partnership alone isn't going to put them in profit, nowhere close, not to mention McD are going to be suffering themselves (relatively speaking) over the next few years.

- People with plant based diets don't tend to be huge McD consumers.

- BM's growth has been poor over the last few years. A lot of meat eaters tried these plant based burgers as a gimmick during the initial hype, few continued to buy it regularly. Sure, there is a general growing market for plant based options but it's a slow burner.

- Even within that growing plant based market, Beyond Meat is expensive. It's a luxury choice. It's exactly the type of business I can see suffering over the next few years as disposable income shrinks.

They might be on a nice path for the future if you're thinking very long term, but in general these equity markets are placing the most weight on what's happening in the next 6-24 months, and in the next 6-24 months I can't see a bullish argument for Beyond Meat.


I think that's because many market participants make bets on other people's expectations rather than anything fundamental. That's why the market is always wrong ;-)


This quote came to mind when seeing the title but I could not remember the source (read it in high-school, I think before learning formally about derivatives). I'm glad someone found it.


First and only time maybe...


Sounds like a real jerk.


In terms of an real-time strategy (RTS) game, like Starcraft:

1. base: how many Marines you have

2. dx: how many Marine-producers you have = X Marines / sec

3. d2x: how many Marine-producer-producers you have, your harvesting units = (X Marines / sec) / sec

4. d3x: how many harvester-producers you have, your bases

5. d4x: how many base-producers you have

Idle games also fall in this category: first you chop wood with a crap axe, then you use wood to upgrade to a better axe, eventually you assemble an axe factory.

Inverted pendulums use such advanced math as well: https://en.wikipedia.org/wiki/Inverted_pendulum


StarCraft mineral mining is interesting.

50 minerals per worker + 100 minerals per supply depot at some amortized rate.

You have a dampening term on workers/mineral patch which saturates between 2-3 workers. It’s pretty linear till then.

Then you get a new base and do it again.

The problem is you have both time and minerals (and supply, gas) as resources, which means there are multiple competing derivatives. I’d be interested in seeing if you can approximate the economy with derivatives alone but I think you’d have to have some discrete simulation.


You purposefully over-saturate (to 3/patch) your existing base before you create a new base. Then when the new base becomes operational, you can "maynard" a chunk of workers to the new base and have it be immediately productive at ~1 worker / patch.


Swarm Simulator takes the "starcraft as derivatives" idea and runs with it, out to 30+ levels. https://www.swarmsim.com/#/


yep, this is part of the class of games called "Idle games" or "incremental games"

https://en.wikipedia.org/wiki/Incremental_game

Universal paperclips is a famous one: https://www.decisionproblem.com/paperclips/index2.html


In Total Annihilation and Supreme Commander you can also tell construction units to help build construction units at a unit construction facility.

The faster you build construction units, the faster you can increase the amount of construction units you have available to build construction units more quickly.


Number of base producers you have isn't correlated to the rate at which you produce bases.


My memory is fuzzy, but I think it depends on faction. For zerg, your drones can turn into bases and drones come from bases.

Within a game, the "derivatives" start looping on themselves to keep the game balanced and interesting.


It doesn't depend on the faction, producing more bases doesn't depend on having more scvs, drones or probes. It depends entirely on what your opponent is doing and how you are countering it. Idle games are the worst analogy. Even rock-paper-scissors comes closer.


> It doesn't depend on the faction, producing more bases doesn't depend on having more scvs, drones or probes.

In SC2 it does for Zerg: their units are weaker than other races so in order to compensate that you have to reinforce faster which is done by having more hatcheries to mine more and produce extra larva.

In BW the only thing that pushes additional bases is using gas-heavy strategies since there's only 1 geyser per base with limited rate of gathering.


What they mean is: if you have 200 drones, your base production rate is 200 bases per 100 seconds.


Operation cwal


Not exactly an answer to your question but also from finance. A fun moment after the 2008 financial crisis came when a lot of pundits were trying to call the bounce. Everyone kept going on MSNBC and the like saying that “the second derivative was positive” and saying that was a sign the economy was about to turn around. I was watching one day and yet another person said that for some indicator (maybe nonfarm payrolls?) the second derivative was positive and therefore things were about to get better when Mohammed El-Erian (who was also on the program) said dryly “There are lots of analytic functions where the second derivative is consistently positive and the first derivative is consistently negative”. There was a stunned silence.


As a simple example, one can look at f(x)=1/x in R+. The derivative is f'(x)=-1/x^2 and the second derivative is f''(x)=2/x^3. In general, every function of the form f(x)=1/x^n with odd n will have this behaviour, and if n is even the behaviour is the opposite. And yes, many more examples can be found.

More generally, this is why I'm wary of indirect indicators. They never tell the whole story, and because of that they're used disingenuously in order to muddy the waters. You see this a lot in big scale PR campaings, such as climate change denialism, and pro-sugar and pro-alcohol disinformation (we had a lot of pro-tobacco as well, but it has subsided in the last two decades or so, at least in the West).


For those who find the existence of such analytic functions intuitively "wrong", note that it is essential to this example that though the second derivative is positive, it is positive and decreasing towards 0. If the second derivative is bounded from below by some positive value, then eventually the first derivative will become positive and it will diverge towards positive infinity and thus the function itself will diverge towards positive infinity.

More precisely suppose that f is twice continuously differentiable and f'(x) < 0 and f''(x) ≥ 0 for all x greater than some K (for example K=0 in the examples given) then λ( (f'')^-1((a, ∞)) ∩ (K, ∞) ) < ∞ for all a > 0 where λ is the Lebesque measure.


Yes exactly. There are folks who would ride that positive second derivative all the way down to f(x) = 0 and believe every step of the way that the indirect indicator is telling them that we're going to turn around any second now.


A good example for pundit disproving is f(t) = exp(-t), the solution to the differential equation dx/dt = -x. So the continuous limit of something like "every year, 1% of the ice caps melt." Look, the volume of ice cap lost is decreasing year over year!


Also, while we might accept a certain smoothness hypothesis (fuzzy logic as applies to human perceptions) in financial valuations, these functions certainly aren't (if I may be pedantic) analytic at all.

If a function is analytic, then the derivatives at one point tell the whole story on the complex plane--the information is all encoded at (an arbitrarily small neighborhood around) a single point. But most smooth functions aren't analytic; indeed, a smooth function that is the trace of a process taking any stochastic external input will typically (probability 1) not be.


Yes, and El-Erian certainly understands that. He was using classes of analytic functions as a relatively simple example of things that had the properties he was talking about.

Generally speaking in finance things like price trajectories and timeseries like economic indicators are modelled as stochastic processes. Often a Wiener process with drift, and then jumps and jumps in volatility added as needed to capture the dynamics of the situation if required. So there's definitely no requirement to be smooth or diferentiable everywhere, and there is even less requirement for a positive 2nd derivative to lead to a positive slope/turnaround.


Hi @seanhunter, any chance you have a source for this?


Bezier curves.

Cubic bezier curves (generally the most common type) are represented by cubic polynomials x(t) and y(t) (or just one polynomial P(t) where the coefficients are vectors). The first derivative gives you the tangent and normal. The second derivative gives you the direction the normal will gradually become as t increases. The third derivative gives you the change in this change (the fourth derivative is zero). Curvature is also computed from the first and second derivatives: K = det(P', P'')/||P'||^3

Other kinds of bezier curves are similar. In quadratic ones the first and second derivatives are normal and normal change but the third derivative is zero. In higher-polynomial bezier curves the third derivative changes over time as the fourth is non-zero, and so on.

Source is a really interesting video on bezier curves which I highly recommend: https://www.youtube.com/watch?v=aVwxzDHniEw.


And these are common in everyday life due to screensavers, right?


Fonts, vector graphics, interpolation for animation and video games


I think that, nowadays, it’s more likely that fonts use quadratic Bézier curves (as in TrueType and its derivatives), rather than cubic ones (as in PostScript and Adobe’s Type 1 fonts), but since OpenType supports both (https://en.wikipedia.org/wiki/OpenType#Description) I may be wrong.

Similarly, SVG supports both quadratic and cubic Bézier curves.


And cars. Curves with higher-order continuity is why modern cars have such interesting smoothly curved surfaces.


This was the raison d'etre for Bézier curves. Its inventor and re-inventor worked at car companies.

https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Invention


Roads and tracks. Connecting straightaways and turns to at least second order (sometimes third, esp. for high speed trains) makes transitions much smoother as it reduces or eliminates jerk.

https://en.m.wikipedia.org/wiki/Jerk_(physics)

Even during driving, intuitively you don't yank the steering wheel to the desired position but produce a eased-in eased-out progressive movement that results in such a trajectory.


Steering an airplane is a fun one - you the pilot want to set the compass direction of the plane. The derivative of that is the rate of turn, corresponding to bank angle. But what the yoke / stick actually controls is the derivative of that, the bank angle rate / roll speed.

So pilots have to sort of double-integrate to set their heading.


Huh, this is interesting!

So to put that into context, driving a car is only the 1st derivative right? The steering wheel angle corresponds (although nowadays non-linearly) to that of the wheels, a function of which is the driving direction.

Do you know whether the “angle rate” behavior is unique to airliners, or does it apply to other aircraft as well? Because my assumption (based mostly on imagination and videogame controls) would be that f''(x) handling can’t be reactive enough for the real-time type of flying done in helicopters or fighter jets…?


Yeah, car is one step simpler, steering wheel sets the derivative of direction (turn rate).

Fighter jets definitley have that same double-integration, although they can handle super fast control inputs, roll speeds etc. Not as familiar but I think helicopters too - the cyclic stick controls bank angle and pitch, which you'd use along with the pedals during turns in moving flight. But while hovering in place you could rotate with just the pedals (tail rotor) more like steering a car.


> The steering wheel angle corresponds (although nowadays non-linearly) to that of the wheels

This is interesting, I always thought that it was linear. I was wondering about how speed impacts this (if at all) and now I will have to dig deeper :)


Many other comments have noted "jerk", the derivative of acceleration that you can feel in a car; but here's maybe a way to make that a little more concrete.

Suppose you're driving, and you keep your speed constant (no change in the accelerator or "gas" pedal). Keeping the steering wheel at a fixed orientation then moves you uniformly along a fixed circle == constant acceleration == constant force (you feel from car) to the left or right.

But when you move the steering wheel, you're changing the circle radius, and changing acceleration, which changes the force you feel. To a first order approximation (I think), the rate of change of steering wheel position is the rate of change of acceleration, or 3rd derivative of position.

It's not a surprise that a car ride feels smoother when move the steering wheel slower, but the speed of steering wheel motion is the simplest tangible example I can think of for controlling and experiencing a third derivative.


I have read that for this reason, the Euler spiral (a.k.a. Cornu spiral) is commonly used in the design of modern roads. Its defining characteristic is that the curvature changes at a constant rate with respect to arc length. So a curve in the road is typically composed of three parts: First, a section of an Euler spiral starting with zero curvature, joined by a circular arc, then a new Euler spiral ending once more at zero curvature. When I first learned about this, I tried it on some recently built roads. And indeed, entering the curve I can move the steering wheel at a constant rate, hold it still through the middle of the curve, t’en move it back at a constant rate until I am once more traveling in a straight line.


cool! I will try to drive safely while also pondering this the next time I'm driving.


The accelerator and brake pedals are the same. Although in many cars the maximum jerk via the accelerator seems quite limited.

Jerk is also what triggers car/motion sickness. So for the comfort of your passengers, move the controls slowly. Roller coaster designers know this well and I think they even consider fourth and fifth derivatives when designing coasters.



A fun one with easy visualization is mechanical engineering statics, in which one calculates how much something deforms from a force (e.g., a bookshelf or bridge sags, a spring stretches, or an elastic tire or sponge or pillow squishes). The standard example is simple beam bending [1].

If you hold a thin beam (say, a ruler or a stiff piece of paper) horizontally in the air by one end, and press down on the free end, it bends from a straight line into a third-order (cubic) polynomial.

To calculate this, one considers the beam as a number of little segments connected to one another. The vertical force on each segment due to the force pressing down is constant over the beam. The first integral of this is the torque ("moment") on each segment. The second integral is the slope of the beam, and the third integral is the actual shape of the bent beam. If you consider it the other way around, the force is the third derivative of the resulting beam shape. This is often visualized in a "shear force and bending moment diagram".

The best part is there's a stupidly simple approximation to calculate how much bending you get from a single force (Hooke's law [2]): the distance the beam moves is proportional to the force (by some constant you can get either with these derivative calculations or by experiment).

[1] https://en.wikipedia.org/wiki/Bending [2] https://en.wikipedia.org/wiki/Hooke%27s_law


Someone else pointed out Bézier curves. What is interesting is such are same as the bending equation!

Back in the pre-cad days, designers would bend a piece of thin, elastic spline-wood to draw curves. From the side it looks exactly like a Bézier curve, this is not a coincidence, Beziers are more or less same as the physical bending equation for such a spline.


CNC machining relies on motion controls with higher order derivatives.

https://tenmilesquare.com/resources/iot-connected-hardware/a...

"Note: In the past TinyG used 3rd-order “constant jerk” motion planning, similar to a form of controlled-jerk motion planning that is found in some commercial products. TinyG has since moved on to even smoother motion control that uses further derivatives “snap” (4th derivative), “crackle” (5th derivative), and “pop” (6th derivative). As far as we know, no commercial CNC products advertise that they use 6th-order motion planning."


Agile Development 1. Story points 2. Velocity = user story points completed per iteration 3. Burn out = number of sick days per iteration due to unreasonable estimates 4. New hires = number of new developers you have to hire because the old ones quit


At Pivotal, developers always gave the estimates (fib: 1,2,3,5,8 was most commonly used). If the story was > 3 points, it was broken into smaller stories. Thus, you were never working on stories that were more than 0-3 points and by then, most of the stories were pretty clearly defined, easily estimated units of work.


Although a fairly good approximation of that analytical version is a dice roll :-)


"sudden" acceleration 0: position 1: velocity 2: acceleration 3: jerk


To add to this, jerk is super relevant to self driving cars. While the car itself can handle sudden changes in acceleration, the humans inside often cannot. Self driving systems must account for jerk in their algorithms.

It's also super relevant to roller coaster design.


Something I've been wondering for awhile about this: is it specifically jerk that humans can't handle well, or all of the higher order derivatives? A lot of times we're talking about a car that's at rest (and has been at rest for delta t>0), so every order derivative is going to be positive when the value starts increasing (the rate of increase, the rate of rate of increase, the rate of ...).

Is there something specific about jerk that makes it important to optimize for, or are all position derivatives of order 3+ the same?


A mental model I employ is: from a frequency response perspective, humans are 30Hz high pass filters. That means we end up conducting more high-frequency force (either by actively fighting it or by having it act against our inertia by transmitting thru our bodies), and this is work. In the lower frequencies, we can generally more actively participate and e.g. spread out the energy transfer over longer time periods to decrease instantaneous forces in joints/etc. Picture jumping off a 3 ft ledge, you can "eat" most of the impact with your legs bending, but some of the energy is going to affect you. The mental model is that it's the high-frequency content that human bodies don't handle well.


> Is there something specific about jerk that makes it important to optimize for, or are all position derivatives of order 3+ the same?

I think of it in terms of neck muscles. If your car is accelerating at a constant rate, you feel that as a force pushing your head back. Your neck muscles activate to compensate and keep your head still.

If the acceleration changes suddenly and aggressively (i.e. high jerk), so does the force on your neck. So either your neck muscles react quickly to counteract the new force, or your head bounces around.

Higher order derivatives also matter, but mostly inasfar as they act on the acceleration (and hence force) that you feel.


Jerk is what spills your coffee.


Isn't that the acceleration? With constant acceleration (thus zero jerk) inertia makes your coffee move inside the cup – and spill, if you don't pay enough attention.


I believe a way to view it is as such

1) coffee is always under constant acceleration (g).

2) constant acceleration (say in the X direction instead of Y) would just mean a constant "tilt" within the cup. compare this to an airplane that is not "accelerating" and just at a constant X velocity, coffee would look "still/flat" in your cup.

3) its only the jerk that changes the "tilt" within the cup (and hence causes the spill)


Constant acceleration will cause the surface of your coffee to tilt, but not spill it unless the cup is almost full. Jerky motion (non-constant acceleration) causes it to slosh around and can create resonances that disturb the fluid level far more than a constant acceleration of the same magnitude would.


no, and its simple to visualize even

If you move in a circle around a corner, you have constant acceleration, otherwise you would go straight (centripetal force needs acceleration to exist). yet it is possible to move a coffee cup in a corner, as long as you tilt it a little bit. So acceleration is not the issue

However if you suddenly change the direction of the coffee cup, you introduce jerk, because you accelerate the acceleration (you change the size of the circle means you change the acceleration, therefore you introduce jerk = coffee spilled on the floor)


Hate that guy


That pun really resonates.


I believe camshaft profiles are designed for minimum jerk of the valve stem.


4, 5, and 6 also exist (but to my understanding aren't really used): https://en.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_deriv...


They mostly exist so they can be called "snap", "crackle", and "pop".

https://web.archive.org/web/20180626030437/https://info.aiaa...


The 4th derivative is quite important for good motion control where it is usually called 'snap'. Specifically, it is relevant both for feedforward control design [1] and trajectory planning [2]. As shown in the latter, it is advantageous to design trajectories based on segments of constant snap. Consequently, also including 'snap' in the feedforward signals makes the achieved position profiles notably smoother.

[1] "Control for precision mechatronics" https://doi.org/10.1007/978-3-030-44184-5_100044

[2] "Trajectory planning and feedforward design for electromechanical motion systems" https://doi.org/10.1016/j.conengprac.2004.02.010


Infinitely many exist if the function is infinitely differentiable (aka smooth).


I believe 4th (& possibly higher) is relevant in aeronautics/astronautics and robotics.


What comes after jerk? Also it’s weird to think velocity has inertia but acceleration doesn’t.


After jerk come snap, crackle, and pop. These are rarely used in practice, but I believe snap (the 4th derivative) correlates with noise in high speed trains, so it's worth optimizing railroad tracks to keep snap (and of course jerk) low. This is one reason why polynomial spirals (Spiro curves) can be great tools for representing trackways or road centerlines; with G4 continuity, snap is continuous which means crackle is finite.

Also see this paper[1] (also cited by 'jjgreen elsewhere in this thread) which discusses the perception of higher derivatives in the context of roller coaster rides.

[1]: https://iopscience.iop.org/article/10.1088/0143-0807/37/6/06...


Your inertia comment kept me (over)thinking for a while.

So what is inertia, and what makes it interesting on its own?

I guess we could describe it as v(t) = v(t - d) if a(t - d) = 0 for small d (velocity remains constant unless a force, i.e. acceleration, is applied) but this seems to be a bit self referential since it's just a longer way to say a(t) is v'(t).

What makes inertia interesting compared to other derivatives? Isn't acceleration "inertial" wrt jerk by definition? Or rather, any derivable function is "inertial" wrt to its derivative. Even if we had velocity change without external forces we'd just introduce a "phantom force" like gravity to make it all work nicely.

Is inertia as a concept just an artifact of classical physics being framed in terms of position and forces?


Card games. e.g. MtG or LoR.

You've got to deal X damage to win.

You could directly cast spells at an opponent each turn.

Or instead you can play units or destroy enemy units to affect the amount of damage being done each turn.

Certain cards even increase the amount you can increase your damage each turn, e.g. by reducing costs, drawing cards on future turns, or improving deck contents.


This is an interesting one. Obviously the fundamental theory of MtG is that cards have value roughly proportional to their mana cost, and the player that deploys more value overall will usually win. It’s a valid strategy to attack your opponent’s ability to deploy value (hand/land disruption, cheap permission/removal etc) but it’s often missed that aggro decks are in a sense using temporal denial. If you don’t get your fifth turn, all the card draw and mana in the world doesn’t matter, in the same way a 10 year bond isn’t useful to you if you have no money to eat today. So MtG offers valid strategies that match all sorts of different second and third order curves. Aggro cares about immediate liquid assets above all. Control cares about compound interest. Mid range balances the two.


Drug derivatives are pretty common in chemistry and pharma. First-order derivatives are drugs that are created from the parent drug via just one chemical reaction. there are derivatives of derivatives which create (fun, lol) headaches for pharma licensing and marketing regulatory authorities.

Ecgonine is a tropane derivative from coca leaves and is convertible 2-carbomethoxytropinone and then cocaine. Another example is making buprenorphine from thebaine which is used for making oxycodone, oxymorphone, buprenorphine, naloxone and other opiate agonists. US Controlled substances act in 1986 spelled out the number of steps was irrelevant.

https://pubs.acs.org/doi/10.1021/acsomega.0c00282

Another area we're seeing twice and third derivatives to get around regulatory & consumer purview is perfluoroalkyl chemicals ie PFOAs, PFAS, PFOS. Consumers and regulators start avoiding or banning some of them, let's just spin up some derivatives of the perfluorooctane sulfonic acids that they haven't cracked down on yet and put that in everything until the people become savvy and then we'll move on to newer harmful unbanned things!


They're rather important in roller-coaster rides, see for example https://iopscience.iop.org/article/10.1088/0143-0807/37/6/06...


While it's mostly a phenomenological observation (and not a natural law), many types of movements in humans and animals are well described by a "minimum jerk trajectory" [1]. There's a ton of debate about whether or not the brain is actually computing or optimizing the 'jerk' of your arm at all - or if it just happens to be the consequence of minimizing the effects of noisy neurons and muscles.

[1] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6565116


Everyday life may be a stretch, however some higher-end quadrotors are able to navigate safely in complex indoor environments by generating trajectories that minimize the snap, the second derivative of acceleration.


To elaborate: Since a quadrotor can only generate thrust in one direction, any smooth trajectory through space specifies a unique pitch/roll attitude at each moment in time. The attitude at time t is determined by the trajectory's acceleration at time t, along with gravity.

Therefore, angular velocity is determined by jerk - the rate at which this thrust vector is changing.

The angular velocity cannot be changed instantaneously, because the quadrotor can only exert a finite torque about its rotational axes. So we need to design trajectories that do not attempt to change the angular velocity -- and hence, the jerk -- too quickly.

Therefore, we should try to minimize something like the maximum norm of the snap along the trajectory.

In practice we often minimize the integral of the squared norm of the snap, because it can be posed as a convex quadratic optimization problem with respect to the control points of a spline.


It’s also incredible that strapping on FPV goggles and practicing can build an intuitive sense for this. Brains are amazing.


Wait, meaning the third derivative of the what is already the second derivative of position - so snap = 5th derivative of position? Is there an intuitive explanation for this?

Just checking my understanding.


Linked elsewhere, the Wikipedia page is pretty good: https://en.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_deriv...

The Wikipedia page on Jerk also has a good explanation for the how people feel that: https://en.wikipedia.org/wiki/Jerk_(physics)

I'm unsure if we can really feel Snap and beyond.


Snap, or jounce, is the fourth derivative of position.


I thought that was called "jerk".


0th derivative = position

1st derivative = velocity

2nd derivative = acceleration

3rd derivative = jerk

4th derivative = snap

5th derivative = crackle

6th derivative = pop

I just learned the last 3 due to this discussion and Wikipedia[1][2].

[1]: https://en.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_deriv...

[2]: https://en.wikipedia.org/wiki/Snap,_Crackle_and_Pop


It gets crazier:

−7th: absop

−6th: absackle

−5th: absnap

−4th: abserk

−3rd: abseleration

−2nd: absity

−1st: absement

https://en.m.wikipedia.org/wiki/Absement


Thanks! Very enlightening.


Jerk is the third derivative of position and is very familiar to anyone who has ever ridden a bus or other vehicle with not-so-smooth acceleration curves.


An interesting fact: it has been shown ([0], [1]) that human body movements are performed in such a way as to minimize the jerk, so the jerk is used in robotics to make humanoid robot movements look more natural.

[0] https://doi.org/10.1109/TAC.1984.1103644

[1] https://doi.org/10.1523/JNEUROSCI.22-18-08201.2002


Are there intuitive examples of snap, crackle and pop?

What are they used on?

(Very nice to think about)


Intuitively I think you would be able to tell the difference between a jerk and a snap. In a car experiencing jerk, you would find yourself no longer able to balance against acceleration and you would sway. In a snap, you would not just sway, but really bounce around. Think the difference between hitting the gas pedal in ludicrous mode vs hitting the gas pedal while driving over potholes.

Crackle and pop, I have no idea if you could tell the difference.


When you "scroll" on smart phones, the scroll speed is calculated a bit like a physical simulation with an instantaneous acceleration (second order) by a "flick" on the screen and then set to slowly decrease the scroll speed (first order).


The universal speed limit applies to the 1st derivative of position, and we have nerve endings that can "feel" the second derivative, which seems to be a pretty important one!


more crudely, i'd say..."you feel the second derivative in your gut"


And race car drivers with their butt.


options trading

when you calculate risk/exposure of your position, you want to consider Delta and its derivative, Gamma. But you also need to consider the rate of change of Gamma.


More specifically, if you are a market maker and are in the business of selling options you want to hedge your portfolio. To do that you need to buy a certain amount of shares of the underlying that you sold calls on. As the price of the stock goes up you need to buy more stock (delta) but also the rate at which you need to keep buying stock increases (gamma). The fact that you keep buying stock as the price goes up further pushes the price up and can shoot the price to the moon (gamma squeeze)


PG, who built up YC, which builds up startups, which build up products/services.

OTOH, I have never encountered PG in everyday life, so perhaps this doesn't count!


Haha, I actually think about this a lot.

There are mechanical g-force meters you use when driving. The position of the needle is the acceleration (2nd derivative of position). The velocity of the needle would be the 3rd derivative. The acceleration of the needle would be the 4th.


This is such a cool thread and why I keep coming to HN. I think that if I had friends like this that nerded out on such things and made such escoteric things like second and third derivatives of things I’d not have bombed calculus.


Music ?

A sound wave at a specific frequency is a cyclical difference in air pressure, so there's an infinite number of derivatives here. But let's take the Fourier Transform to keep it simple: a specific frequency is a constant. Music is made by having different frequencies together, ie multiple constants, and changing them over time ie first derivatives. You also want that change of rate to be smooth, which means there is an impact on the second derivative. I'm not sure what the third derivative would be, but I guess it would be the change in rhythm, tone, or even changing music.


This confused me more than it should have, thinking through "is the interest rate really the time derivative of the amount of money outstanding on my loan?"

It might be easier to think of it in terms of a bank deposit. If I put $100 in a bank account and the rate of interest is 5%/year, after a year my balance has grown by $5.

Of course, a loan works the exact same way in reverse. But as consumers normally we think of a loan as being paid off over a fixed length of time, so the rate of change is the rate at which you pay it off, and only second-order influenced by the interest rate.


I see your point. The interest rate in isolation is not the derivative (an exponential function is), but it does uniquely parameterize the derivative.


Jerk (derivative of acceleration, so 3rd derivative of position) matters when planning drone trajectories:

https://www.coursera.org/lecture/robotics-flight/supplementa...

https://www.youtube.com/watch?v=8RILnqPxo1s


Changes in health insurance premiums.

Age (base) -> Health (a large amount of the premium is based on age) (1st derivative) -> Premium (2nd derivative) -> Change in Premium (3rd derivative)


Pandemics, disease control, and epidemiology :)

i.e. infected = base. New infection rate, spread, R0 etc = 1st derivative. R0 increasing or decreasing = 2nd derivative.

Environment, Metereology and Climate.

Climate/phenomenon (i.e. global warming) = base. Is it increasing/decreasing = 1st derivative. Is the rate of change increasing or decreasing (i.e. as carbon emissions start to enter the atmosphere after the industrial revolution) = 2nd derivative.

You could get really fancy and say that climate is a statistical function on localised individual weather observations which follow the above pattern. And that you can take a derivative on the numbers generated by these individual observations themselves measuring localised 1st/2nd derivatives. Does that make it a third derivative? Exercise left for the reader :)

Economics, Finance, Risk and Regulation.

Closely related to interest rates and equilibrium funnily enough. Lets take mortgage stock/book cause it's easy.

A percentage of mortages go into default. 1st derivative. Are the rate of defaults (or adverse events) increasing or decreasing: 2nd derivative. (am i right on that, i haven't thought too hard, just whipped it out).

Indeed, I imagine it would come up in a lot of places where things can transition between states of equilibrium. To observe equilbrium and transition to another state, you may need to first measure 1st derivative. 2nd derivative may then inform on whether the system is transitioning to a new equilibrium/state or not. Sorry if that's too abstract.

Engineering

I presume higher derivatives would come up anywhere there's possibly of feedback loops. 2nd derivative can tell you if the system is heading towards catastrophic failure.

Which brings us to...

Anything (or at least a lot) of fields that invovle practical or empirical measurements or estimations of exponential effects. Since in the real world most exponential effects have a natural limit or regulator, we're often interested in knowing when the phenomenon hits its natural limit. And this means observing the rate of change (2nd derivative) on the rate of change (1st derivative) to pinpoint where and when the exponential behaviour is breaking down.


Carbon emissions is a big one.

Since the climate is far from equilibrium, temperature goes as something like the time-integral of excess carbon concentration.

CO2 concentration goes with the integral of total emissions. So emissions is roughly the second derivative of temperature.

But public policy discussions are often taking place on the level of slowing the rate of emissions growth. Which is about four derivatives up from temperature.


We use biharmonic diffusion operators in oceanography as a basic turbulence model, which is effectively a fourth order derivative in space. It is like an accelerated diffusion which aggressively dissipates small scales but preserves the large physical scales more robustly than normal diffusion.


Kuramoto-Sivashinsky is another fun equation with biharmonic operator.


Maybe you can help me: what is it about turbulence that remains mathematically 'unsolved'? How is turbulence different than navier-stokes applied to a really fast moving medium with directional randomness?


Turbulence can be accurately solved by simulating the Navier-Stokes equations on powerful enough computers. [0] The problem is that the computational complexity is enormous. Even relatively simple turbulent flows may exceed the capabilities of a supercomputer 50 years from now. This is pretty easy to show mathematically using the Kolmogorov scales [1] combined with the CFL condition [2] to estimate the computational complexity of unbounded turbulence. (But it's an incomplete estimate. Adding boundaries or other complexities will increase the computational cost.)

The real turbulence problem is figuring out ways to get around the computational complexity with cheaper models. Accurately modeling turbulence without using the full Navier-Stokes equations is really hard.

Also, contrary to what the science media says, the Navier-Stokes existence and uniqueness problem doesn't have anything to do with turbulence being hard aside from that both involve the Navier-Stokes equations. [3, 4] 2D Navier-Stokes, where existence and uniqueness has been proved, still has turbulence.

[0] Given accurate initial and boundary conditions.

[1] https://en.wikipedia.org/wiki/Kolmogorov_microscales

[2] https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%...

[3] https://news.ycombinator.com/item?id=31227133

[4] https://news.ycombinator.com/item?id=31049535


I think the statement has different meanings to different people, but one "unsolved" problem is the ability to model the dynamics of small scales (the "turbulence") in terms of the large-scale "observed" flow.

The question has very strong analogies to thermodynamics. For example, one can average over microscopic motion to yield something like a diffusion equation, where transport of the (microscopically averaged) density is pushed from high to low concentrations, and all of the microscopic details get wrapped into a single number, the diffusion coefficient.

In fact, averaging over molecular dynamics works in so many contexts that the details end up not being terribly important. You will always end up with something like a diffusion equation.

It's very reasonable to think this ought to work more generally, averaging over the turbulence to produce a similar expression for the dynamics of the large-scale. But if you try to apply similar averaging techniques to the Navier-Stokes equations, the averages never end, no clear solution emerges, and the only hope to terminate the exercise is to insert some kind of "closure approximation".

Some consider a robust theory for such a closure approximation, or any method to resolve the impact of the turbulent flow on large-scale flow, to be an unsolved problem of turbulence.

These questions have been researched for many decades, and a great deal has certainly been learned, but a rigorous closure theory has been elusive. Meanwhile, the computers keep getting bigger and faster, to the point where the turbulence can in many cases be modeled reasonably well. And as the questions around turbulence become relegated to smaller and smaller scales, one starts to wonder if this is a problem that will even need to be solved in the future.


My understanding is that it's "solved" in the sense you say, we know that the solution obeys the NS equations. The problem is that we can't actually solve them on a sufficient range of scales to actually make that knowledge useful for making predictions, so we have to resort to approximations.


Turbulence is unsolved because Navier-Stokes is unsolved.


Elevators. You want to keep the 3rd derivative of position (jerk) limited, to have a smooth ride


Interest is not a derivative of a debt instrument such as an obligation.

The most common example quoted is slowing the rise of the rate of increase in inflation. Inflation is change in price, i.e. first derivative.


Similarly, finance people don’t consider interest rates/yields to be derivatives. So, on a bond “duration” is the first derivative of price with respect to yield, and “convexity” is the second derivative.


Agree with whomever said options but it should be noted that the higher derivatives “lurk” in the lower ones in real life.

Example: a simple change in position means that the object had to move or experience two changes in velocity (starting and stopping). And to change its velocity it had to accelerate, and in order to do that it had to change its acceleration (from 0 to whatever) and so on.

So it is with all deltas that require basically many derivatives to happen at the edges.


driving is higher order derivative thinking (speed, rates of change in speed, relative rates of change in speed) and this is why most people suck at it.


Disk space = base, change in disk space = 1st derivative, rate of change = 2nd derivative.

Useful as a monitor for the rate of change in data intensive applications that sometimes spill to disk. Spikiness is okay if it reverts towards the base within a certain timeframe, but not okay if the rate of change persists or increases over same timeframe.


I suppose it depends on how you define "everyday life", but in digital image processing, derivatives can be used as a relatively simple method for edge detection.

For example, the Sobel and Prewitt operators (1st derivative) and the Laplacian operator (2nd derivative) can be used as filter kernels to detect edges in images.


There was a HN submission about the G forces in roller coasters.

G force is acceleration, so a second derivative.

Early looping roller coasters had big spikes in G force rather than a steady G force. This made them horrible to ride on, so no one did, and was a problem to be solved (later solved by a different loop shape).

Measure how spikey G forces are is the 3rd derivative.


"Why roller coaster loops aren’t circular anymore", https://news.ycombinator.com/item?id=32005421


Jerk is the 3rd derivative of position after velocity and acceleration, and has real effects on people.


Recently when I wasn’t merging into traffic fast enough I was told “More acceleration.”


Jerk is the feeling you get when you change acceleration, for example in a car when you go from a little gas pedal to flooring it. That abrupt change is jerk. The third derivative of position with respect to time.


y(t) = bank balance

y'(t) = income

y''(t) = raises


y'''(t) = job hopping(rate of increase of raises)

Perfectly explains grifters.


Hardly everyday life, but "The Greeks" are used often in (financial) options pricing and market risk analysis.

Delta, Gamma, Theta, Rho. And then some more obscure ones like Vega and even a thing called Vanna.


Roller coaster curves are so you experienced a gentle change in acceleration, i.e. the fourh derivative of position.

We also see this for car brakes (and is responsible for the "elevator feeling".)


Health. We care about our actual level of health, of course, and we care about the first derivative. But as I get older, I'm starting to keep an eye on the second derivative...


For a second I thought you are referring to kids(first derivative) and grand kids(second derivative) haha


base = location 1st = velocity (location/time AKA speed) 2nd = acceleration (location/time/time AKA rate of change of speed) 3rd = jerk (location/time/time/time AKA rate of change of acceleration)

If you've ever rode in (or drove) a Model S P85D, P90D, P100D, Performance AWD, or Plaid, you'll understand "jerk".


see "Derivative Thinking with George Chiesa [Just for Jerks]" https://vimeo.com/GeorgeChiesa/Just4Jerks


Reads to me like op’s example is a fourth derivative as they are slowing the pace!


You can read the book The JERK by my dear friend Chris Surdak...


Change in acceleration is one. I always wondered if we could feel that.


It’s called jerk and it’s what gives you a whiplash feeling.


It's also what makes you fall over on the bus or train.

You can handle a surprising amount of lateral acceleration if the jerk is low. 0.5g is pretty much like standing on a steep hill.


Fun fact: the derivatives of position after velocity, acceleration, and jerk are snap (or jounce), crackle, and pop.

Source: https://en.m.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_der...


Fuel prices (1st order)

Affect people's decisions to go on longer trips to the country (2nd order)

Which affects growth and tourism of outlying towns in the country (3rd order)


It's funny because NFT 10k collections is all derivs of punks for example lol


.......not that type of derivative


"Acceleration of a rate of labor productivity growth" - 6th derivative.

Not found in English, but in original Russian - "ускорение темпов роста производительности труда" - about 4,090 results in Google.

"The acceleration of labor productivity growth" in English - about 11,700 results. But that's only a 5th derivative.


I only see a 3rd derivative here. 1st: labor productivity, 2nd: rate of labor productivity growth, 3rd: acceleration of a rate of labor productivity growth.

The quote in Russian also describes a 3rd derivative.


Acceleration - d2t

Rate - dt

Labor - dt

Productivity - dt

Growth - dt

Altogether d6(Work)/dt

The quote in Russian is an example of a 6th derivative.

It was often mentioned next to a proof that the party line was straight (каждая точка - точка перегиба).


Let’s say “labor” refers to building houses, and “labor productivity” refers to how many houses are build in a year. This is the first rate of change (1st derivative). For example, “in 2019 one house was built, in 2020 one house was built, in 2021 one house was built”, and the 1st derivative is 1 house per year.

“Labor productivity growth rate” is how much the first rate of change changes (2nd derivative): for example, “in 2019 one house was built, in 2020 two houses were built, in 2021 three houses were built”, the second derivative is 1 house per year per year. This is the second rate of change in that statement.

Finally, “acceleration of labor productivity growth rate” describes how the growth changes (the third rate of change): “in 2019 one house was built, in 2020 two houses were built, in 2021 four houses were built”. The 3rd derivative is 1 house per year per year per year. No other rates of change are mentioned in your statement.

Does this make sense?


I don't know Russian, but I'd read the English quote as referring to a third derivative - the units of "labour productivity" are work/time; so growth of that is a second derivative. Also if someone said "acceleration of speed" I would assume they meant acceleration, so that only adds one derivative.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: