Poll

2 votes (33.33%)
No votes (0%)
No votes (0%)
No votes (0%)
1 vote (16.66%)
2 votes (33.33%)
1 vote (16.66%)
2 votes (33.33%)
3 votes (50%)
1 vote (16.66%)

6 members have voted

Wizard
Administrator
Wizard
  • Threads: 1518
  • Posts: 27035
Joined: Oct 14, 2009
August 6th, 2020 at 10:14:30 AM permalink
It was a slow week so I threw together this formula proving Euler's formula. Please have a look. I welcome all comments, but please keep in mind I'm not making a Ken Burns documentary here.


Direct: https://youtu.be/eX5sjvcC9Hs

The question for the poll is what do you think of the video?
Last edited by: Wizard on Aug 6, 2020
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1518
  • Posts: 27035
Joined: Oct 14, 2009
August 6th, 2020 at 2:02:47 PM permalink
Here is a link to the graphing calculator seen in my video, done by our own JB.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5357
Joined: Feb 18, 2015
August 6th, 2020 at 3:43:50 PM permalink
Quote: Wizard

Here is a link to the graphing calculator seen in my video, done by our own JB.



This graphing calculator is so cool. Its part of an emerging set of online calculators that seem kind of transformational -at least for those of us that don't have MATLAB or MATHEMATICA. I would love for JB to write a short post about what was involved in producing this.

I haven't yet watched the Euler's Identity video, but I will do so. It sounds interesting.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
BleedingChipsSlowly
BleedingChipsSlowly
  • Threads: 23
  • Posts: 1033
Joined: Jul 9, 2010
August 6th, 2020 at 5:18:58 PM permalink
Well done! Especially the section explaining and showing how Taylor Expansion works, since the proof hinges on using that method. The logic is easily followed. It comes together at the end like a well written play; all the plot lines converge to a satisfying resolution. I was surprised to learn the relationship the formula has to trigonometric functions.
“You don’t bring a bone saw to a negotiation.” - Robert Jordan, former U.S. ambassador to Saudi Arabia
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
August 6th, 2020 at 5:35:56 PM permalink
I think Euler is actually pronounced like “Oiler”
It’s all about making that GTA
BleedingChipsSlowly
BleedingChipsSlowly
  • Threads: 23
  • Posts: 1033
Joined: Jul 9, 2010
August 6th, 2020 at 5:41:47 PM permalink
Quote: Ace2

I think Euler is actually pronounced like “Oiler”

That’s what I thought, too, but I found references that have it as “you-ler.”
“You don’t bring a bone saw to a negotiation.” - Robert Jordan, former U.S. ambassador to Saudi Arabia
Wizard
Administrator
Wizard
  • Threads: 1518
  • Posts: 27035
Joined: Oct 14, 2009
August 7th, 2020 at 4:36:30 AM permalink
Thanks for the kind words everyone.

Quote: Ace2

I think Euler is actually pronounced like “Oiler”



Dang, I hadn't thought of that. Now that you mention it, I think that's how my math teacher(s) in college pronounced it.

In fact, "Euler's Method" was the key plot point in Hidden Figures. In this scene (skip to 0:47 if you wish), two characters pronounce it as "oil-er." Dang.


Direct: https://www.youtube.com/watch?v=v-pbGAts_Fg
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
JB
Administrator
JB
  • Threads: 334
  • Posts: 2089
Joined: Oct 14, 2009
Thanked by
gordonm888
August 7th, 2020 at 7:41:41 AM permalink
Quote: gordonm888

This graphing calculator is so cool. Its part of an emerging set of online calculators that seem kind of transformational -at least for those of us that don't have MATLAB or MATHEMATICA. I would love for JB to write a short post about what was involved in producing this.


The most challenging part was discovering, and trying to work around, the hidden dilemma that awaits anyone seeking to implement a graphing calculator. I hereby name it the Needle in an Infinite Haystack problem.

Each one-pixel-wide "slice" of the x axis represents an infinite number of x values. The dilemma is, for discontinuous functions, how do you determine if there is an x value within that thin-yet-infinite interval which produces a y value within view (or anywhere really), and if so, what that x value is so that you can evaluate the function at that value? The goal of course being to plot something, if there is something there to plot.

For example, x! only produces output if x is an integer. I currently have it “rigged” to always evaluate integers unless there are too many, but if your function is, say, (x + 0.01)! then the dilemma rears its ugly head -- the graph is empty, because the calculator has no way of knowing that it should evaluate the function at x values which are 0.01 less than an integer.

I did implement the gamma function, so I might just make x! graph gamma(x+1) instead, but there are plenty of other functions such as x^-x where the problem manifests.

Ultimately, I divide the width (1000 pixels) by the x-axis range and evaluate the functions at equal increments, in addition to integers that aren't already included, as mentioned above. In other words, I see no practical/efficient solution to the Needle in an Infinite Haystack problem. I couldn't even craft a search query for it (try searching Google where your terms include "graphing calculator" and "problem" and you'll see what I mean, if it isn't already obvious). But, I take comfort in the fact that other online graphing calculators more or less exhibit the same behavior as mine in this regard.

Then there were boilerplate issues, such as the discovery of a Chrome bug whereby an SVG path is erroneously closed using the stroke color rather than the fill color (even with fill:transparent; or fill:none;) when the number of points in said path exceeds some arbitrary (and variable) threshold; so I had to break up each path into smaller chunks that Chrome can handle.

I also tried implementing it using a <canvas> element, but <canvas> sucks! If you zoom in, it just gets pixelated - so I reverted to SVG. I build a large string representing the SVG and set the innerHTML to that; it's much simpler than the alternative -- and you would still have to build SVG paths as strings anyway if you used the "proper" method, and paths are the vast majority of the SVG content for this particular project, so just building a large string was easiest.
gerback123
gerback123
  • Threads: 4
  • Posts: 21
Joined: May 13, 2020
Thanked by
Ace2
August 7th, 2020 at 2:24:55 PM permalink
Great job, I just used euler's number to calculate probability of the back to back royals I recently hit at Red Rock
Wizard
Administrator
Wizard
  • Threads: 1518
  • Posts: 27035
Joined: Oct 14, 2009
August 7th, 2020 at 4:15:59 PM permalink
Quote: gerback123

Great job, I just used euler's number to calculate probability of the back to back royals I recently hit at Red Rock



Congratulations!

If you care to phrase the question in a specific way, I'd be happy to offer my answer.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
gerback123
gerback123
  • Threads: 4
  • Posts: 21
Joined: May 13, 2020
August 8th, 2020 at 8:55:23 AM permalink
Thanks Mike! I was just saying that I hit back to back royals playing 10/6 DDB at Red Rock the past week in quarters. The simple calculation would be 40,000 x 40,000 for that back to back event to occur, but you could also use Euler's to calculate that as well, correct?
Wizard
Administrator
Wizard
  • Threads: 1518
  • Posts: 27035
Joined: Oct 14, 2009
August 8th, 2020 at 9:44:51 AM permalink
That would be a good approximation for two out of two royals. I think the more appropriate question is what are the odds of back to back royals given x total hands played. To be honest, I'm not sure what the Euler formula you refer to says.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
August 8th, 2020 at 11:14:56 AM permalink
Quote: Wizard

That would be a good approximation for two out of two royals. I think the more appropriate question is what are the odds of back to back royals given x total hands played. To be honest, I'm not sure what the Euler formula you refer to says.



Wouldn't that be Poisson?
Wizard
Administrator
Wizard
  • Threads: 1518
  • Posts: 27035
Joined: Oct 14, 2009
August 8th, 2020 at 5:19:44 PM permalink
Quote: rsactuary

Wouldn't that be Poisson?



That would be a good way to approximate it and how I would do it.
Last edited by: Wizard on Aug 11, 2020
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
  • Jump to: