Showing posts with label mathematics. Show all posts
Showing posts with label mathematics. Show all posts

Wednesday, August 26, 2026

Computer visualization

I have not seen much 3-D math visualization; I'm not sure why. Modern computer packages should make it quite easy to do, and I gather the 3-D goggles have become much cheaper. Even 2-D, when you are able to rotate and zoom on the image, can put on your desktop things that used to require craftsmen to build. This is part of a collection of math geometry models at U of Illinois.

Friday, March 13, 2026

Approximating a magic function

I got to wondering about a function to generate the primes: $\Pi(n)=$ n'th prime. Obviously that would have truly weird behavior: an infinite number of primes are only 2 apart, and the gaps between primes can also be exceedingly large too. But just for laughs, suppose one existed.

I'd bet that you couldn't use a Taylor series to calculate it – maybe locally, but nothing like the famous $1 + x/1 + x^2/2! + x^3/3! ...$.

Suppose you approximated it with longer and longer polynomials. Name the polynomial that fits the first $N$ primes ${}_{N}\Pi(x)$ (with ${}_{N}\Pi(k) = p_k$; the k'th prime, with k less or equal to $N$), and the coefficient of the $x^j$ term call ${}_{N}c_j$.<\p>

As $N$ increases, and the new polynomial fits more and more primes, do the coefficients converge? The first (the constant term of the polynomial) ${}_Nc_0$ is always $1$. How about the second ${}_Nc_1$ (coefficient of $x$) and third ${}_Nc_2$ (coefficient of $x^2$)? (By the construction of these, the polynomial to fit $N$ primes will only have $N+1$ coefficients.)

It won't come as a great surprise to see that they don't seem to converge. The polynomials resulting from fitting the first 30 primes gives this for the behavior of those two coefficients. They look like they're about to blow up.

But its not that simple. Expand the graph to include the first 50 polynomial second and third coefficients, and they switch directions and start to blow up the other way. You see that the deviation that looked so large in the plot above is invisibly small in the one below.

Not a big surprise – we didn't expect that the magic $\Pi(x)$ function to find all the primes was going to be simple to approximate. After all, the magic function has to be extremely "jumpy" and polynomials are nice and smooth. But the variation is certainly dramatic.

Of course this isn't entirely fair – trying to fit polynomials to points is famously ugly and unstable. But this is pretty dramatic.

UPDATE: If you were wondering if I was plotting round-off error, the answer is no. I did the calculations using pari/gp 2.13.3, and only turned the integer rational numbers into floating point at the printing step. If you are curious, I include the script below:

Top = 50
coeffs=matrix(Top, Top)
for(N=2, Top, \
 target=primes(N) - vector(N, k, 1); \
 arr = matrix(N, N, i, j, i^j); \
 co = (1/arr)*target~; \
 for(i=1, N, coeffs[N,i] = co[i];););
\\
for(i=1,Top,\
 for(j=1, Top, print1(1.*coeffs[j,i],","););print(" ");)

Monday, December 08, 2025

Born and/or made

AVI linked to an essay dissecting twin studies.(*) David Bessis wrote a book (which I have not read) which sounds interesting and useful, but I suspect overclaims. "People think that it (mathematics) requires a special gift or that comprehension is a matter of genes. Yet the greatest mathematicians throughout history, from RenĂ© Descartes to Alexander Grothendieck, have insisted that this is not the case. Like Albert Einstein, who famously claimed to have “no special talent,” they said that they had accomplished what they did using ordinary human doubts, weaknesses, curiosity, and imagination."

I'm not on the same level as those fellows, but I'm well better than average at math.

I only know that by comparison.

I don't feel particularly smart.

It's trivial for me to find problems that stump me. There are people who can solve those problems--and in an academic environment I meet them.

Being acutely aware that a colleague can easily deal with things that puzzle me is a ticket to imposter syndrome. I can't have the same painful awareness of the things that puzzle my colleague that I know how to deal with. Once you've solved a problem it seems easy, so the world is full of hard problems and all I solve are the easy ones.

I don't think that a researcher is always, or perhaps even often, going to be the best judge of how smart he is. An honest man or woman will be honestly humble, a member of the society of the puzzled.

Further, when you're surrounded by the best, that becomes your normal. At Princeton, Einstein didn't run into a lot of people who were no good at math.

FWIW, I suspect that most people are capable of understanding much more math than they dream. Mathematicians are born, but they need to train their minds in ways of looking at things, and with "crystallized intelligence" (standing on the shoulders of giants) even those of us who aren't great geniuses can learn how to make contributions.

I've griped before that advanced math books (and papers) often throw theorems at you without enough examples or motivation. That's not how they did the work to get there -- they played with examples, had some motivation to point them the way they did, and they did a lot of noodling around trying this approach and that.

(*) I'd always wondered how often it would happen that twins would be broken up to different homes. Among other details Bessis dug up, many of the separated twins were raised by relatives in their extended family, so their environments may not have differed that much.

Friday, January 24, 2025

Taylor Product?

We learned, so long ago we've probably forgotten when, about the Taylor Series. \begin{equation} f(x) = f(x_0) + (1/2)(x-x_0) f^{'}(x_0) + (1/6)(x-x_0)^2 f^{''}(x_0) + ... \end{equation} If the derivatives are large, this might not converge very quickly (if at all). If the function $f$ is reasonably well behaved, and positive, we can try looking at products instead. Never mind the complex logarithms for now. \begin{eqnarray} f(x) = e^{log(f(x))} \\ g(x) \equiv log(f(x)) \\ g(x) = g(x_0) + (x-x_0)g^{'}(x_0) + (1/2)(x-x_0)^2 g^{''}(x_0) + \dots \\ f(x) = f(x_0) e^{(x-x_0)g^{'}(x_0)} e^{(1/2)(x-x_0)^2 g^{''}(x_0)} \dots \end{eqnarray} Will this converge any faster? For a distance use the difference between the approximation so far and the true value, divided by the true value. Pick a couple of simple examples: $f(x)= e^{x}$ and $f(x) = x^2$. The first one converges much faster with a "Taylor Product" \begin{eqnarray} f(x) = e^x \\ g(x) = x \\ g(x) = x_0 + (x-x_0) 1 + 0 + 0 + 0 \dots \\ f(x) = f(x_0) e^{(x-x_0)} \times 1 \times 1 \dots \end{eqnarray} The "distances" for the approximations are \begin{eqnarray} (f(x)-f(x_0))/f(x) = 1 - e^{x-x0} \\ (f(x)-f(x_0) e^{(x-x_0)})/f(x) = 0 \\ 0 \\ \dots \end{eqnarray} The second function example is, of course, much easier to approximate with a Taylor Series; you only need three terms for it to be exact. \begin{equation} f(x) = x_0^2 + (x-x_0)\times 2x_0 + (1/2) (x-x_0)^2 \times 2 = x^2 \end{equation} But never mind that; let's use the "Taylor Product" anyway. Here $g(x) = 2\log(x)$ If we let $x=x_0+1/2$, and let $x_0 = 1$
order g deriv $g^{(n)}$ at $x_0=1$ scale term f cumulative
at $x_0=1$ error frac
0 $2\log(x)$ 0 1 .555
1 $2/x$ 2 2.718 -.208
2 $-2/x^2$ -2 .7788 .059
3 $4/x^3$ 4 1.0869 -.023
4 $-12/x^4$ -12 .9692 .009
... ... ... ... ...
Suppose instead that $x=x_0 + 1/2$ but $x_0 = 1000$. It probably won't surprise you to see that it converges faster, using the given distance measure. \hline
order g deriv $g^{(n)}$ at $x_0=1$ scale term f cumulative
at $x_0=1$ error frac
0 $2\log(x)$ 0 1000000 .001
1 $2/x$ .002 1.0010005 -2.5 E-7
2 $-2/x^2$ -.000002 .999999 8.3 E-11
3 $4/x^3$ $4\times 10^{-9}$ 1.00000 -3.1 E-14
... ... ... ... ...
I don't know what this is actually called, and search engines turned up reams of irrelevancies. On a related note, MathJax in Blogger doesn't understand tabular mode.

Sunday, December 01, 2024

Twisted little plots

As preparation for a project, I wanted to look at the behavior of $x^x$ on the unit circle. For those not familiar with the unit circle, that's on the complex plane, where a complex number is displayed by its "real" part (along the x-axis) and its "imaginary" part (along the y-axis). Numbers with absolute value = 1 appear on a circle in this plane. Each point on the graph represents a single complex number, not two numbers, though it can be broken down into two numbers.

I start with points $x$ on the unit circle (marked in blue), calculate $x^x$, and connect the dots for the results in green. There are a few red lines to guide the eye showing what points on the unit circle map to points on the new curve.

Now since $1 = e^{2 \pi N}$ where $N$ is an integer, there can be a lot of different results. The simplest case is $N=0$, of course. In that case $-1^{-1}=-1$. The point where the curve crosses itself is at $(e^{-\pi/2},0)$.

A bit twisted.

If you're curious what happens when $N=1$ (I was), look at this.

The real curve is smooth; I only used a few points to calculate it which is why it looks jerky. There's a bit of swooping around 0 that doesn't show up at this resolution. To see that, look at the central part. For N=-2, -1, 0, 1, 2, the central part looks like this:

There are things that look like $1$ that don't entirely act like $1$.

Wednesday, September 25, 2024

Minor amusement

I know I should use the time walking laps more productively, but I find it hard to compose in my head: I start a scene, but keep circling back to the beginning. Praying gets distracted too. So. Factoring numbers, anybody?

Everybody knows how to check if (in base 10) a number is divisible by 3: just add the digits, and if the sum is divisible by 3, so is the original. 9 is easy too: just add the digits, and if the sum is divisible by 9, so is the original. 2 is easy: is the right-most digit even? 5 is easy: is the right-most digit 0 or 5? 4 and 8 are easy to do sequentially, or you can look at the last two digits: if divisible by 4, the whole number is. The last 3: if divisible by 8, the whole number is.

Ah, but 7? Hmm. (Spoiler; there's a simple way to check, but I didn't know it then.)

If we've a number k whose digits are $N_n N_{n-1}...N_2 N_1 N_0$, where $N_0$ is the units digit, $N_1$ the 10's, and so on, we can write this as $\sum_i N_i 10^i$. That's trivial. Suppose we divide by 3, but divide each of the $10^i$ terms. For $i=0$ (i.e. 1), we have 0 R1. For $i=1$ we have 3R1, then 33R1, 333R1, etc. Now we have two parts: $\sum_i N_i 33..3$ (a nice integer) and a remainder of $\sum_i N_i (1) / 3$. The leftover part, the sum over the digits, determines whether the number is divisible by 3. OK, that's pretty simple, and proves that the old rule, which we knew already.

Dividing by 9 works the same way, except that the integer part after dividing by 9 is $\sum_i N_i 11..1$ with 1's instead of 3's. The remainders are also 1, just as before and the remainder term is also a sum of the digits, divided by 9.

How about 7?

i$10^i$integerremainder
0101
11013
2100142
310001426
41000014284
5100000142855
610000001428571
etc

So, If you create the sum $1 N_0 + 3 N_1 + 2 N_2 + 6 N_3 ...$, if the sum is divisible by 7, so is the original number.

Granted, it's not as nice as the simple digit sum, but it works.

Before you ask, no, I only worked out the sketch of this on the track. I need pen and paper as much as the next person.

For those who have been snickering, yes, I looked this up and found the easy way too.

One way to think about the problem is to note that if you think of dividing the number into all the digits except the units digit, and the units digit, there'll only be 1 or 2 possibilities for the units digit for which the whole is divisible by 7. So maybe breaking the number up that way would be productive; maybe there's a simple relationship.

$k = 10 \times A + B$, where $B$ is a single digit. Now noodle around a bit: multiply by $5$. $5 \times k = 50 \times A + 5 \times B = 49 \times A + A + 5 \times B$. Part of that is obviously divisible by 7, so if $A + 5 \times B$ is divisible by 7, the original number is also. E.g. 4627 $4627 = 10{\times}462 + 7$, so $A=462$ and $B=7$. The formula says $462 + 5 \times 7 = 497$. Inspection says that's divisible by 7, so the original was too. Obviously you can use the formula $A - 2B$ as well. You'll find both easily on search engines.

Suppose we wanted to find a similar formula to tell us about 11. We need 2 digits for $B$, so we rewrite our number $k$ as $100 \times A + B$. Looking closer we see $100 \times A + B = 99 \times A + A + B$. Since 99 is already divisible by 11, we immediately see that if $A + B$ is divisible by 11, so is the original number. Check 7271: $72 + 71 = 143$, which is $11 \times 13$.

For 13, it isn't hard to see that $A + 3 \times B$ works: try it with 8593.

No doubt there are tables of these simple tricks somewhere

Yes, the church nursery posts a number in the sanctuary if a parent needs to come see to their child. And yes, I try to factor it.

Sunday, May 26, 2024

Teaching algebra ideas in elementary school

Back in the 90's I offered to help at the local elementary school, and somebody took me up on it. They assigned me a half dozen 3rd grade TAG students and gave me a package called Hands-On Equations, in which students use marker and number manipulatives to get a feel for how to manipulate equations.

The theme of the system is a balance scale, and the balancing rules are made easy to visualize. Once you're set up, both sides of the scale always have to balance. You can add numbers to both sides, split into groups to show division, and get a feel for what it means to have a name for an unknown. The video shows a newer version, in which the cubes have actual numbers. I like the older approach better: if you want to represent 12, you count out 12 cubes onto the workpad. It makes numbers easier to visualize, and to separate into groups (divide), or to combine groups (multiply). Since you don't have to do the translations (a 10 cube is the same as a 5 and a 5), the lesson is simpler to visualize.

The kids learned the material quickly enough, and the last lesson had a sneaky problem or so that would trip up kids who were guessing their answers. I thought it was a clever approach. There was one more day than lessons, so I ended by giving them a little explanation of clock math and triangle math, not as parts of a field of study, but as examples of mathy things that didn't work like the usual counting numbers.

Sunday, May 05, 2024

Neutrality forbidden

The political economy of Solon’s law against neutrality in civil wars, evaluated in game theory.

I posted about Solon's counterintuitive law that punished people who refused to take sides in a civil strife. The paper linked at the top begins with a little history of arguments about Solon's law--quite a number of people living 2600 years after the event are certain that a report written only 200 years later must be mistaken. Would a wise lawgiver put in a clause that might cause his laws to be overthrown?

The authors apply some game theory to the Athenian situation (whose population was legally divided into classes by wealth), assuming that revolts would be driven by rent-seeking high-status leaders. They find that the rule requiring everybody to join the melee tends to suppress the inclination of the wealthy to try to corner the whole pie.

It isn't obvious, and I suspect the origin of Solon's law might have been more emotional, driven by exasperation, instead of decided by calculation.

It might be instructive to game this out in modern America. We have had fringe revolutionists for a very long time, with such luminaries as Charles Manson, Bill Ayers, and the current pro-Hamas occupiers. The sociopolitical system we have works for most of the people. In a conflict with no neutrality, the revolutionists would be terribly outnumbered by the people with something to lose. The only way for the revolutionists to survive would be to battle from underground, robbing banks to get funding (as many of them did), and hope for the "best" (aka chaos they could exploit). It seems Solon's rule wouldn't change much.

OTOH, powerful and better-connected people who want more power and more complient plebs (you can think of a few on the opposite side from you, and an opponent think of a few on your side, and both of you be right) are able, now perhaps even more easily than in Solon's time, to persuade masses that their cause is existential. Without neutrality, they'd have to persuade more than a plurality. Would that reduce the risk of civil war?

No. The powerful aren't any wiser than you or I, and self-deception is just as popular a pastime with them as with us. And once a war gets rolling (or even just the pre-war posturing heats up), especially if it involves populations larger and more diverse than a mere city-state like Athens, there's no predicting the direction.

It doesn't look like a silver bullet to me. It might help with the fringe revolutionaries, but they're arguably cultists, and game theory considerations don't enter when you're talking about ultimate values.

UPDATE: Of course, forbidding neutrality is stunningly arrogant. Looking at warring factions, a legitimate option is "A plague o' both your houses!"

Monday, March 18, 2024

math creativity

Most mathematicians, like chess players, do their best work young. Not always, though. Claire Voisin describes mathematical creativity.

And yes, sometimes time at work is spent beating one's head against the wall in a fog, and clear thinking comes when you're walking or doing something completely different. I've had lots of great ideas come while I was in a worship service. I don't know if that's supposed to be a gift or a distraction...

Monday, December 04, 2023

Making progress?

I spent very little of the day out of bed. When you can't sleep for coughing, and you can't concentrate enough to read, and you haven't the strength to do any of the growing list of chores, what do you do?

I finally managed enough energy to finish watching a youtube series I've been watching(*): unfortunately he's only about 3/5 done with it.

I think it was Erma Bombeck who wrote that being pregnant was like taking a cruise in at least one respect: you might just be sitting in a chair watching the ocean, but you're making progress.

As long as I sleep a little longer, and cough a little less, I suppose I am.

UPDATE: My teaching daughter said 2/3 of 3'rd grade was out sick yesterday.


(*) Including "the square root of a vector". The series is much more accessible than the titles suggest, though you do need to have a little matrix theory under your belt. He repeats everything, and uses simple examples. It's nice to see an explanation of Clifford algebras, and how spinors can be represented in them, but it isn't transparent what gain we then have in comprehensiveness, new physics, or simplicity.

Monday, November 27, 2023

Views

"I suppose there are two views about everything," said Mark.

"Eh? Two views? There are a dozen views about everything until you know the answer. Then there's never more than one. But it's no affair of mine. Good night."

In math that's not always strictly true. In arithmetic, yes; but sometimes objects of very different types turn out to be equivalent to each other. A proof may be quite hard within one system, but in the equivalent class of objects in a different system may be quite easy. Relatively speaking, of course.

Friday, March 24, 2023

The history of a project

Way back in grad school, when I was learning about Clebsch–Gordan coefficients and the finite tools used to study continuous groups, I wondered if there was a symmetry that went the other way: could one find continuous symmetries from mixing the elements of a finite group? And could one use the mixing field theory formalism we were studying to represent particle interactions as a finite group?

I gave it a try, and after an embarrassing false start, found that there could be. More detailed inspection showed that it wasn't a very plausible physics model, but there was something interesting (to me) going on. I managed to publish what I had, but I had enough on my plate to make essentially no progress for years. The question I wanted to answer was: given a finite group, can I predict what its continuous symmetries (of this obscure type) will be?

In one of my spurts of activity, I found that another grad student had a textbook I wanted for the study, and went to buy it. He insisted on selling two books as a bundle, so I wound up with Theory of Group Representations as well, which I hadn't wanted. Worse, the book I did want didn't help me much.

The project lay idle again for a while, until I decided to BFI tackle a simple family of groups in a systematic way--and I got a result. I wrote it up, but wanted to supply some tools for study to go with it before I tried to publish it.

Back burner again.

So I retired, and had some free time. I created the tools for finding the interesting quantities given a finite group, loaded them into GitHub, and did a deep dive literature search one more time--reading years worth of abstracts and skimming a promising paper now and then. I didn't find anything--was this really a new result? That would be cool.

But that day I noticed something for the first time--the symmetry I described was actually much more general than I had been claiming--it was an isomorphism of a group algebra onto itself. No way this was unknown--this is the sort of thing mathematicians are always looking at. And, in an ironic loop back to the begining of it all (Clebsh-Gordon coefficients arise from group representations), I realized I should have been looking at the group representations.

And so, "the stone the builders rejected", Naimark and Stern, Theory of Group Representations page 97, Chapter 2, Section 2.9, Theorem 1, Corollary 1. "The group algebra of a finite group is symmetrically isomorphic to the direct sum of complete matrix algebras."

If I had attacked the problem harder earlier, I'd have learned the answer to my question decades ago. So no, there's nothing new in my work. And no, $SU(3)\times SU(2)\times U(1)$ doesn't pop out.

Thursday, March 02, 2023

Fun little oddity

I was doing a literature search and my eyes started glazing over. I took a break by skimming through a journal I'd never heard of before: Elemente der Mathematik "publishes survey articles and short notes about important developments in the field of mathematics; stimulating shorter communications that tackle more specialized questions; and papers that report on the latest advances in mathematics and applications in other disciplines. The journal does not focus on basic research." In other words, suited for both more applied and more random stuff. The discussion section is in German, unfortunately.

"The irrationality measure of $\pi$ as seen through the eyes of $\cos(n)$. A student asked: "What's the limit of $\cos(n)^n$?" Since it's always less than 1 in absolute value, as n becomes large, the result should go to zero. Except it doesn't. In fact, it "oscillates", because larger and larger fractions come closer and closer to approximating $\pi$. They go on to discuss qualitative irrationality, but that's more for specialists.

I suppose one conclusion to draw from this is: pay attention to student questions. Sometimes there's something weird hiding that nobody noticed before.

Drat. The article is too recent to qualify for the open access. I could read the paper in the library, but not from home. In order to cut down on the number of points, I didn't draw anything with abs() less than .01--pretend there's a line across the middle. Done with python, and I'm trusting that their $\cos$ function handles large numbers well.

Thursday, February 02, 2023

I didn't know he'd written more

(The lyric transcriber misspelled Andrew Wiles name, unfortunately.)

Wednesday, November 30, 2022

Another base curiosity

You learned long ago that representations of fractions can involve repeating decimals, such as 1/7 = 0.142857 142857 142857 ... to infinity.

Not so with non-integer bases. In base 3/2, the representation of 1/2 is an infinite but non-repeating decimal. This is already known, but I thought such a simple example was worth noting.

Friday, November 25, 2022

Another sequence

This representation looks utterly useless, but amusing anyway. You can easily see some patterns; there's a reason for them. (I have to do something when walking laps--mulling over crazy stuff works.) (And yes, you can represent all the integers this way.)
0
1
110
111
100
101
11010
11011
11000
11001
11110
  ....

hint below

Monday, November 14, 2022

Timewasting

I didn't start a quest to find the most useless functions possible, just got to noodling starting with the prime question a bit earlier. Probably everybody knows the old faithful Taylor series for $e^x$: $\sum_{n=0}^\infty x^n/n!$. That's for all non-negative integers $n$. You know what $e^x$ looks like.

What do we wind up with if we try something similar but with the primes instead? Naturally there are plenty of possibilities. In what follows let $p_i$ be the i'th prime number.

How about just having products of primes in the denominator? $$\sum_i { {x^i} \over {\prod_{n=1}^i p_n}}$$

It falls to a minimum and then starts to rise again as you go negative. It doesn't rise as fast as $e^x$ for increasing $x$, unsuprisingly.


OK, suppose we use factorials instead of just the products of primes. $$\sum_i {{x^i} \over {p_i !}}$$

For $x$ increasing it also doesn't rise as fast as $e^x$, but for negative $x$ it climbs faster than before. Both this and the previous have a minimum: the one about about -2.7 and the previous at about -3.27.


One more, just for laughs. Pick out just the $e^x$ Taylor series expansion terms with prime powers of x.

$$ \sum_i {{x^{p_i} \over { {p_i} !}} $$

It has 2 inflection points, and rises with $x$ increasing and falls with $x$ decreasing--sort of like a cubic would. Curious.(*)

And not obviously useful.


To wrap up, what started the exercise for me was, for $x \in [-1,1)$, $$ \sum_i { {x^i} \over {p_i} } $$.

Naturally this diverges almost everywhere, but it's cute.

If you've wondered why high school graphing calculators haven't changed in 20 years, this is why: it would do most of your algebra homework for you.


(*) It looks like Mathjax fails with this command--it boxed the raw LaTeX instead of processing it. I wonder why. And to make the text fall below the images, I had to add "style=clear:both;" inside the paragraph command.

Saturday, November 12, 2022

Testing Mathjax

It's well known that the sum of the reciprocals of the positive integers is infinite. It's less well known (ran across it a couple years ago) that the sum of the reciprocals of the primes is also infinite (Euler, 1737).

The linked article has proofs about the series $1/p_i$, but seems to only say that the divergence of the sum $\sum_{i=1}^{n} 1/p_i$ is greater than $\log\log(n+1)$.

I'd bet that $$\lim_{n\to \infty} {{\sum_{i=1}^{n} 1/p_i} \over {\sum_{i=1}^{n} 1/i} } \to 0$$ it seems obvious -- but I'm not sure how to prove that yet. Euler could probably have done it in his sleep. I'd need to mull over their approaches for a while.


It looks like this works


UPDATE: Yep, it's pretty obvious. The difference between the prime sum and $\log(\log(n))$ is finite, and so the numerator is close to $\log(\log$ and the denominator to $\log$ so the ratio tends to 0. Anyhow, this Mathjax tool seems to pass the initial tests.

Thursday, September 15, 2022

Math for scientists?

In Quillette, Thornett says most STEM majors should skip calculus and learn statistics. I was in physics, which of course needs calculus and differential equations for the models the field uses--and more than just those. But most week-to-week research work didn't use anything beefier than trig--there were months where all I was doing was programming, or hardware work. On the other hand, there were (much shorter) spells when derivations were all I did.

More statistics would have been useful, especially if better targeted to hypothesis rejection, etc. Simple statistics should be taught as soon as possible, starting before high school. How to Lie with Statistics is good.

But I don't think calculus is intrinsically all that hard. There are only two main concepts to learn--what's a derivative, and what's an integral. The rest is just algebra--and the clever changes of variables and whatnot that nobody actually uses in the field. We look them up, or if we need numerical answers, use programs designed to do integrations in stable ways. (Just trying to translate your textbook equations into computer code is fraught with pitfalls thanks to the finite resolution of numbers in a computer.)

I think we can do calculus better if we divide it. One short course would be calculus basics (differentiation and integration), another would be calculus methods (how to play the fancy games), and then you go on to advanced calculus (with the fancy rigor). The first is the one you require of non-math majors.

True, a field geologist may not use much of it, but what happens when he wants to model crustal pressures? Even having just a passing knowledge of rates of change beats just accepting a black box result. I wrote earlier of different levels in math: arithmetic, understanding the abstractions when explained, able to use the abstractions yourself, and able to do research. I think a minimum for most scientists would be "understanding the abstractions when explained." The field geologist needs to know enough to know the tools to use, and have an approximate notion of what sort of results the computer program should give him and why. But how much more depends on what he'll be doing.

There's a story that Terry Pratchett was addressing some physicists, and explaining that he'd wanted to become one, but had problems with calculus and wound up a writer instead--and met with laughter, as people explained that they rarely used anything more than algebra. They were wrong and Pratchett right. If he wanted to understand the field, he needed to know the language. And in the event he probably contributed more as a writer than he ever would have as a physicist.

From "Physicists continue to laugh", translated by Lorraine Kapitanoff:

Group QuestionedTotalKnewDon't KnowAnswer
Writer-Realists 11 74 They argue until hoarse in smoke filled rooms. It is not known why they set up unintelligible dangerous experiments using huge apparatus.
Writer-Visionaries 58 58 0They work on enormous electronic machines called electronic brains. They work primarily in the cosmos.
First year college students65 65 0They speculate a lot. They make discoveries no less than once a month.
Graduate students 30 10 20They solder circuits. They ask the older ones to find the leak. They write articles.
Young scientific staff members, experimenters 19 190 They run to the equipment department. They scrub rotary vacuum pumps. They flap their ears at seminars.
Young scientific staff member, theoreticians 19 19 0They converse in corridors helping to make great discoveries. They write formulae, mostly incorrect.
Older scientific Staff members761They attend meetings. They help younger scientific staff members to find the leak.
Members of the personnel department550 Experimenters must arrive at 8.25 so that at 8.30 they can sit silently next to apparatus which is running. Theoreticians do not work at all.
Members of the guard force6 6 0They walk back and forth. They present passes upside down.
Representatives of the Ministry of Finance18180They spend money to no purpose