By dkl9, written 2024-254, revised 2024-254 (0 revisions)
Usually, people are happy (H > 0) when current reality (f(t)) exceeds their expectations, calibrated by the recent past (f(t - x)), and sad (H < 0) when reality subceeds expectation. That is, to a first approximation, H ∝ f(t) - f(t - x), for all t and some x. It would be most fair (symmetric) to consider all x > 0, but weight them differently. More recent times calibrate one's expectations more, according to, say, e-x. Thus H(t) = ∫-∞t ds es - t (f(t) - f(s)).
That might be a good formula for happiness. My study in that direction ends here. It gets more interesting when seen as a purely mathematical object.
The conclusions are largely the same, just simpler, if we instead work with the related H(t) = ∫-∞t ds es - t f(s).
Some values of that integral for various f:
| f(s) | ∫-∞t ds es - t f(s) |
|---|---|
| 1 | 1 |
| s | t - 1 |
| s² | t² - 2t + 2 |
| es | 1/2 et |
| cos(s) | 1/2 (cos(s) + sin(s)) |
Notice:
In the first three more finite cases, the integral transform gives an alternating sum, f(t) - f'(t) + f''(t). An infinite-series extension — f(t) - f'(t) + f''(t) - f'''(t) + ... — explains the last two, for if 1 - 1 + 1 - 1 + ... has any limit, it would be 1/2.
That is, this infinite integral is equivalent to an infinite series of derivatives. To prove it more rigorously, induce it from repeated integration-by-parts. Pick dv = ds es - t and u = f(s). Then each step preserves es - t as-is and differentiates f(s), reversing the sign.
But wait! There's more. That integration-by-parts shows that the indefinite integral ∫ds es - t f(s) = es - t (f(t) - f'(t) + f''(t) - f'''(t) + ...) + C. So if we can force C = 0, the infinite definite integral equals the infinite alternating series equals an indefinite integral, followed by a simple operation: (∫ds es - t f(s)) / es - t.
You know where else we divide indefinite integrals by exponentials? First-order linear ODEs. In particular, y' + P(t) y = Q(t) is solved with y = (∫dt uQ(x)) / u, where u = e∫dt P(t).
Plugging in expressions above to "unsolve" the ODE, we get y' + y = f(t). Among the three objects from earlier, we can most readily show that the derivative series satisfies that equation. Differentiating the series reverses the sign on each term, such that y' + y would cancel to 0, but for the initial f(t).
The following are equivalent: