Is there a formula?
From last time...
Throw out a mathematical question: Is there a simple formula for similar to the formula ?
YES!
625 loops, best of 3: 349 µs per loop
625 loops, best of 3: 315 µs per loop
<sage.ext.interpreters.wrapper_rdf.Wrapper_rdf object at 0x7f7586a69980>
625 loops, best of 3: 827 ns per loop
1.9395054106807146
380.894800483676
500x speedup!
1.6338910217924854
CPU time: 1.82 s, Wall time: 1.84 s
2.40208877284595e6
So the net speedup from our one liner from day one is a factor of several million in speed.
Exercise now: Draw a plot of the function for various values of ...