Meet Major-Gen'ral Stanley: best, can't deny
Ask for the reasons; gladly, he'll tell you why
Am a Major-General, and by Jove, I'm terrific
'Stead of bragging, let me give examples more specific
Knowledge: mineralogy; plants; animals; prolific
Quote you evry battle from Atlantic to Pacific!
Know all the sovereigns: our land, ever ruled
Mar-athon, Waterloo: Napo-leon, dueled
I know my mathematics well
Equations are a hoot!
A-x squared plus B-y plus C
Sum equals zero? Cute!
x = minus B, then plus
Or minus the square root
Of B squared minus 4AC
Divide: 2A! Salute! 
"Army travels on its stomach": Bonaparte, he said thus 
"Commissariat", I know: division that has fed us
Their logistics cleverly supplied with daily bread, us
Chief Caracta-cus, against invasion: Romans, led us!
I know what progress has been made: modern guns
My tactics: better than a noob 'mong the nuns
I'm solving the unsolvable
Last Theorem, Fermat: prove 
Why, I can spot a forgery
By walking through the Louvre
I know the scientific names
Of all things that can move
King Arthur to Sir Caradoc,
I'm really in the groove!
Never seen a Major-Gen'ral anywhere, so plucky
Sorties and surprises: I am well-prepared, not lucky
Military knowledge: rife; my life has been just ducky 
Always am adventuresome; tops, ev'rywhere they stuck me!
No better officer, a gee, ever sat
I'm an American. A "gee"? What is *that*?! 
Sometimes he shows off by saying it all backwards:
That's "showing off" a bit *too* much,
Don't you think?
STANLEY: [resume singing:]
An officer and gentleman
Who, cuneiform, can write
(Babble on!) 
The Frogs of Aristophanes
I croak all day and night
The crimes of Elagabalus, 
I readily recite
Um, you there, in the green shell... Your opinion?
"Infernal nonsense, Pinafore"
Oh, and a great OS yours is, too!
STANLEY: [resume singing:]
I can tell a rifle from a javelin by looking
Martial art and strategy: new ideas, always cooking
"Mamelon" and "ravelin": there's never been mistooking
Paradoxes, hard acrostics; easily, I'm brooking
Now, this smooshed-up parody is ready for stage booking!
 Considered footnoting the format for quadratic equations and the formula for solving them, but doubted that anyone who doesn't know them, or can't remember, would be interested. (Someone *is* interested? "Quadratic equation" in Wikipedia.. :)
(OK, "woot" is anachronistic. Wanna sue me? Take a number and get in line ... ;)
 One of Napoleon's most trenchant and famous observations (translated from French), "An army travels on its stomach". I. e., it doesn't matter whether they're marching, riding horses, or flying jet fighters; ya gotta keep the troops fed, or you soon won't have any troops.
Relax -- it doesn't matter what Fermat's Last Theorem is, or even who Fermat was. other than a mathematician. (Whew!) What's pertinent here (for the effect) is that in 1637, he wrote it in the margin of a book, with a note that he had a proof, but the proof was too large to fit in the margins. He never published his alleged proof.
Mathematicians struggled for centuries to prove it; many thought that it could *never* be proved *or* disproved. When TT was in college math (in a one-room, log-cabin college heated by a wood stove from the trees that TT chopped down before class), taking courses like multivariable calculus and something called "vectors and matrices" (referred to by this writer as "Victory mattresses ;), the status was still as described above.
It was finally proven, with the help of these new-fangled "computers" that were unavailable to Fermat and colleagues, in 1995, some 358 years after Fermat conjectured it. Therefore, in Major-General Stanley's era, this boast, which was *not* in TOS, far outdoes what *is* there: Pythagorean theory, integral and differential calculus, binomial expansions, and cone-section curves such as parabolas (described as "parabolous" in TOS, and as a pun on "parable" - moral tale -- in this parody of Stanley's conceit
, thus ramping up his arrogance for satire's sake. ;)
 "ducky" -- not the British dialectal usage as "sweetheart, darling, dear", but the dialect-neutral slang: "fine; excellent; wonderful".
(Come to think of it, haven't heard that term used, at least here in the States, for quite a while. Perhaps fading from usage, being replaced -- alas! -- with some other slang that rhymes with "duck"?)
 *Really* -- what *does* "sat a gee" mean? UK people, help! ;)
 Does this pun need explaining?
 While TOS uses "Heliogabalus", that leads to a discussion of whether that's six syllables, or only five
(Dirty, Hairy Turtle: "Did he fire six syllables, or only five? ... And since this is a .555 Magnum, the world's most powerful parody, and will blow your head clean off with laughter, you just have to ask yourself: 'Do I feel lucky today?' Well, do ya, Punk?")
Dictionaries seem to regard the two spellings as equally valid, with "Heliogabalus"' being *six* syllables, at least in modern English. (No offense, Susanna. :) Wikipedia redirects "Heliogabalus" to "Elagabalus" as the primary modern English usage, which is *definitely* the five syllables needed here.