Showing posts with label LabKitty Academy. Show all posts
Showing posts with label LabKitty Academy. Show all posts

Saturday, February 27, 2021

Plot the Mandelbrot Set Using Grapher

LabKitty Academy Logo
Back in the day, MacOS came bundled with a muy cool app called Graphing Calculator developed by tiny software house Pacific Tech (nerd points for recognizing the reference). You typed in an equation and GC would plot it. Huzzah, yes, but mere words fail to capture the GC experience. There were 2D plots and 3D plots, real plots and complex plots, explicit equations and implicit equations, derivatives and integrals, infinite series, parametric curves, polar coordinates, vector fields, contour maps, animations, annotations, trig functions, hyperbolic functions, Bessel functions, gamma functions, airy functions, spherical harmonics, lions and tigers and bears. If you could think it, CG would plot it or brick your machine in the attempt.

When MacOS became OS-X, Graphing Calculator became Grapher. Or so I thought. I always assumed Grapher was Graphing Calculator with a Quartz paint job and a new name, the latter presumably to evade TI litigation. However, the Interwebs insist Grapher is a different animal, developed by a different company, even though the UX is nigh identical to GC. I guess there's only so many ways to implement the "type stuff and plot it" paradigm.

Also like GC, Grapher comes with many built-in examples -- indeed many of the same examples GC did if I recall. However, there's some important exceptions. Missing is the famous GC pac-man, presumably omitted to evade Namco litigation. And the GC 4D examples are missing, presumably omitted to evade blowing your mind.

Of course, also missing is the Mandelbrot set.

Which brings us to today's post.

Sunday, May 20, 2018

Dual Space

LabKitty Great Seal
I used to not understand dual space. I still don't, but I used to not, also.

But I kid Mitch Hedberg. I've recently been trying to read Carroll's book on relativity, and if you know the slightest anything about GR you know you smack into full florid tensor calculus almost immediately. (Imagination is more important than knowledge my furry ass. I want every sullen weeaboo posting that bon mot on Pinterest to write out the covariant derivative a hundred times.)

I grok parts of the tensor machine, but my current tensor bĂȘte noire is dual space. Here the mathozoids have truly attained some unholy capstone of obfuscation. Every account I've come across reads like an elaborate hoax. Like git or the Trump presidency. Like a gaggle of Soho hipsters gushing about a blank canvas hanging in the MOMA.

There exist entire books on dual space that never explain dual space. They simply offer no psychological footholds. Understanding dual space is like trying to climb El Capitan wearing oven mitts.

Saturday, August 27, 2016

Poison Math Frogs of the Amazon

Good morrow cousin! Perhaps you're feeling good about yourself this fine day. Well that will be just about enough of that. For I have an equation for you to solve:

    y = x − sin(x)

No, I don't give you x and ask for y -- that would be too easy. You do the other thing.

Suppose y = 1. Solve for x.

Friday, July 15, 2016

Intro to Orbital Mechanics

LabKitty Great Seal
As you may know, I recently put together a little Javascript orrery for your amusement. This required sorting through what we might call Orbital Mechanics 101. Yikes! I've never seen something so conceptually straightforward (this thingy goes around that thingy) buried under such a mountain of confusing terminology and calculations. I suppose that's what you get from 5,000 years of astronomical observations, much of which being carried out under questionable assumptions like the sun going around the Earth or the Earth being held up by turtles. There wasn't a proper theoretical astronomy until Kepler, and no physical understanding until Newton. Not that it mattered. Newton's laws work in principle but not in practice (the m-body problem has no solution for m > 2). Then, to add insult to injury, Einstein came along 300 years later and showed Newton's laws were wrong. Predicting the correct movement of Mercury was one of General Relativity's early triumphs.

Even when the theory was copacetic the data often weren't, experimental science being what it is. Telescopes are famously ill-tempered instruments even in modern times, as Hubble demonstrated when it was switched on in 1990. The idea of sharing data is also a relatively new invention. Kepler's brilliant insights were made possible by Tycho Brahe's observations, but only after he pried them from Tycho's cold dead fingers. And for much of history, astronomy data came with other occupational hazards. Merely suggesting the Earth wasn't the center of the universe would get you a stern lecturing from the village vicar if not a visit from the Inquisition. Back in the day, it didn't take the United States Congress to impede scientific progress.

Friday, March 4, 2016

Polling -- How do it Know?

LabKitty Academy Greal Seal
Because we are currently living in the Season of the Bitch an election year, you can't swing a dead cat* without hitting a prediction of some sort. These predictions usually come in the form of a poll, or at least the respectable ones do (my Uncle Randall predicting Obama is going to cancel the election so lizard people can extract our vital juices is a different kind of prediction). For example, a recent poll on the CNN website claims Hillary Clinton and Bernie Sanders are tied in the lead-up to the Nevada primaries. Overall, 48% of likely caucus attendees say they support Clinton, 47% Sanders... the article reads (Source: CNN Digital Dashboard 2/17/2016). However, further down the page we find this:
The CNN/ORC Nevada Poll was conducted by telephone February 10-15 among a random sample of 1,006 adult residents of the state. Results among the 245 likely Republican caucusgoers [sic] have a margin of sampling error of plus or minus 6.5 percentage points. For results among the 282 likely Democratic primary voters, it is plus or minus 6 percentage points.
Such a caveat should give any thinking person pause. How can you possibly predict the behavior of millions of voters with just 1,006 phone calls? Isn't this just guesswork? (short answer: No, with a but). Can the result be totally wrong? (short answer: Yes, with a however). What is this voodoo? And what the heck is a margin of sampling error?

Put such questions to a mathozoid, and they will drone on about the null hypothesis and Type-I error and confidence intervals and the standard deviation.

Ask LabKitty and you will get enlightenment.

So, ask away.

Monday, July 20, 2015

Let's make a Mandelbrot set!

LabKitty Academy Greal Seal
LabKitty has a dream. I dream one day all of quantum mechanics, with its hateful partial differential equations and infinite dimensional matrices and renormalizable gauge theory and whatnot, will be replaced by simple mathematics even a child can understand. Perhaps somewhere it already has. This very day, an alien physicist may well be flippering through Wikipedia and snickering.

Feynman diagrams
!, s/he snorts derisively. The puny Earthmeats have yet to discover the true path.

The secret of the Old One, as Einstein put it.

Wednesday, June 18, 2014

The Eight Great Early Calculus Theorems, all in One Place

LabKitty Academy Greal Seal
There is a backbone running through first-semester calculus. A spooky spine.

Like all backbones, the calculus one is hidden from view. It is revealed one member at a time as the course progresses. Think: Gandalf introducing the dwarfs to Beorn one-by-one so as to not invite rebuff by springing the full company on him in one fell swoop. (A scene tragically omitted from Peter Jackson's big-screen adaptation of The Hobbit, I might add. Then again, Mr. Jackson excised Beorn's creepy pedobear vibe so I suppose we should be grateful he here deviated from the source material.)

Those vertebrae are the Great Theorems of first-semester calculus (eight, by my count). Fossils dug from the very urstone, they are. Once the remaining structural vitae is added, it is hung with flesh and sinew and muscle to become living breathing mathematics. But back at the excavation site, while your face is being pressed into the dirt by three exams and a final and everything that comes after, it's hard to take note of the grand edifice being assembled.

One day you look up and there it is, terrible dragon. And as is often the case with dragons, you can't quite remember how it got there.

Wednesday, May 14, 2014

A Plan of Attack for Ordinary Differential Equations

ODE never ends. It's implied on day one of Calc-I, and it doesn't finish until you are cold in the ground. The big pile of integration techniques you learn in Calc-II is the first real hint something mean is skulking in the shadows, although the term "differential equation" usually only officially appears somewhere in Calc-III. And Calc-IV is really just another name for A First Course in Ordinary Differential Equations or at least it was in my undergrad, which I seem to recall was also the title of the terrible terrible $200 textbook required for the course. Written by one of the math department faculty who retired early, presumably to go play naked in his big pile of required textbook money.

If you still haven't had enough, you might have then taken an upper-division ODE course (ours was taught out of Braun, which I wasn't thrilled with generally, although it does have a nice collection of interesting applications such as the Van Meergeren art forgeries and Lanchestrian combat models). After that comes numerical methods, and perhaps a course in PDE, the latter forever the Rodney Dangerfield of mathematics ever since finite element escaped from the lab. Of course, you were also seeing ODE in your other coursework, at least occasionally, with pretty much every problem in physics and engineering a mass-spring system in disguise.

Wednesday, April 30, 2014

Lagrange Multipliers

LabKitty Academy Seal
Lagrange multipliers get my vote as the most wonderful thing in all of calculus, narrowly edging out the red dress Donny Kerabatsos' sister wore to the Calc II final. That was also wonderful, although I don't remember it too clearly, busy as I was bleeding from the ear holes at the time.

Speaking of innocent flowers, who decided Lagrange multipliers should be taught in terms of parallelifying vectors in function space? Orthogonal gradients and directional derivatives and level curves and dot products?? Remember it that way and a month from now you'll be all: What was that Lagrange multiplier thingy about again?

Remember it my way and a month from now you'll be all: Jengo!

(I suppose now you're expecting a side-by-side comparison of the two approaches, listing in detail the strengths and weaknesses of each and in so doing see a case pleaded for the superior. I don't really see that happening. LabKitty is an unhinged Internet demigod, not some Madison Avenue billboard pirate. The product here is revolution, mister, not soap flakes.)

So, come, join me at the freeway on-ramp clutch of discarded refrigerator boxes for a lecture on how to use, and remember, Lagrange multipliers

Friday, April 4, 2014

Let's make a bifurcation diagram!

Here is the discrete logistic equation:

N(n+1) = N(n) + r N(n) [ 1 - N(n) / K ]

Here is the bifurcation diagram of the discrete logistic equation:

bifurcation diagram for the discrete logistic equation

Question: how do we get the latter from the former?

It is here that the mathozoids begin to titter on about Lyapunov exponents and Dulac criterions and Poincare-Bendixson theorems and eigenvalue linearizations and whatnot. Bist du allein klug?* Because for someone trying to get their head around the bifurcation diagram for the first time? NOT HELPFUL.

And, yes, I know there's supposed to be a soupcon on the end of "Poincare."

I'm omitting it to demonstrate my contempt.