Ask HN: Higher order derivatives in everyday life?
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.
172 comments
[ 0.22 ms ] story [ 242 ms ] threadhttps://web.archive.org/web/20180626030437/https://info.aiaa...
[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
It's also super relevant to roller coaster design.
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.
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)
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)
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...
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?
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.
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.
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.
Similarly, SVG supports both quadratic and cubic Bézier curves.
https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Invention
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.
Just checking my understanding.
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
−7th: absop
−6th: absackle
−5th: absnap
−4th: abserk
−3rd: abseleration
−2nd: absity
−1st: absement
https://en.m.wikipedia.org/wiki/Absement
What are they used on?
(Very nice to think about)
Crackle and pop, I have no idea if you could tell the difference.
[0] https://doi.org/10.1109/TAC.1984.1103644
[1] https://doi.org/10.1523/JNEUROSCI.22-18-08201.2002
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.
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.
-- http://www.ams.org/notices/199610/page2.pdf
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.
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.
It was interesting because it raised the right questions but unfortunately dd not beiring any answers.
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.
"And there are some, I believe, who practice the fourth, fifth and higher degrees."
https://en.wikipedia.org/wiki/Keynesian_beauty_contest
- 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.
We also see this for car brakes (and is responsible for the "elevator feeling".)
Age (base) -> Health (a large amount of the premium is based on age) (1st derivative) -> Premium (2nd derivative) -> Change in Premium (3rd derivative)
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
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.
Within a game, the "derivatives" start looping on themselves to keep the game balanced and interesting.
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.
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.
https://en.wikipedia.org/wiki/Incremental_game
Universal paperclips is a famous one: https://www.decisionproblem.com/paperclips/index2.html
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.
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.
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.
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!
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
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.
[1] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6565116
y'(t) = income
y''(t) = raises
Perfectly explains grifters.
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.
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.