A Tribute to Euler (2008) [video]
youtube.com
youtube.com
data Tree x = Leaf | Node x (Tree x) (Tree x)
The question is how many different Trees of size n are there, where n is the number of x values in the tree. Size 0: Leaf
Size 1: Node x Leaf Leaf
Size 2: Node x (Node x Leaf Leaf) Leaf, Node Leaf (Node x Leaf Leaf)
It turns out this sequence goes 1,1,2,5,14,42,...Now we do black magic: we take the Tree x = Leaf | Node x (Tree x) (Tree x) equation and replace Tree x with a function T(x), replace each constructor (Leaf or Node) with the number 1, and replace | with +. We get:
T(x) = 1 + 1*x*T(x)*T(x)
Simplifying: T(x) = 1 + xT(x)^2
We can solve that: T(x) = (1 - sqrt(1 - 4x))/2x
Now we do a series expansion of T: T(x) = 1 + 1x + 2x^2 + 5x^3 + 14x^4 + 42x^5 + ...
https://www.wolframalpha.com/input/?i=series+(1+-+sqrt(1+-+4...Magic!
You can try it yourself with:
data List x = Leaf | Node x (List x)
data Tree2 x = Leaf | Single x | Node x (Tree2 x) (Tree2 x)
And if you're really adventurous, try: data Tree3 x = Node x (List (Tree3 x))
data Tree4 x y = Leaf y | Node x (Tree4 x y) (Tree4 x y)
data Tree5 x = Tree2 (Tree2 x)
data Foo x = Leaf x | Node (Foo x)It definitely is a roundabout and non-pragmatic way, I agree, but I find it rewarding enough to keep me going. Unrelated, I think children's math education could benefit a lot from this kind of approach.
> Don't look for axioms to memorize. Too many courses are consecrated to teaching students to play chords on a set of axioms. This book celebrates the heroic age of calculus, the time of Euler, Maclaurin, Clairault, Lagrange, and Laplace, a time before delta and epsilon. [...] mathematics was invented to do things, not just to be talked about, and today - still - its greatest triumphs are what it can do.
[1] https://www.amazon.com/Sheer-Joy-Celestial-Mechanics-dp-0817...
A big deal that was later made concrete: https://en.wikipedia.org/wiki/Non-standard_analysis
The issue i was bringing up is that the early use of differentials does not correspond to this. The algebraic models of differentials presented in Cauchy or Robinson's nonstandard analysis is not the same thing as the algebraic models used in Euler. The book i suggested uses differentials from beginning to end, but uses the modern, correct form that doesn't lead one to wrong answers when manipulated with standard algebraic rules. There is absolutely no reason to go back in time and inflict this confusion on yourself by intentionally unlearning the hard-won right answer.
Although I should point out that Archimedes correctly understood how to compare different orders of infinitesimals in his book 'On Spirals' (via tangents), circa 200 BCE! Wow!!!