Someone sent me a link to an optical illusion while I was working on a math problem. The two things turned out to be related.

In the image below, what look like blues spiral and green spirals are actually exactly the same color. The spiral that looks blue is actually green inside, but the magenta stripes across it make the green look blue. I know you don’t believe me; I didn’t believe it either. You can open it in an image editor and use a color selector to examine it for yourself.

My math problem was also a case of two things that look different even though they are not. Maybe you can think back to a time as a student when you knew your answer was correct even though it didn’t match the answer in the back of the book. The two answers were equivalent but written differently. In an algebra class you might answer 5 / √3 when the book has 5 √3 / 3. In trig class you might answer 1 − cos^{2} *x* when the book has sin^{2 }*x*. In a differential equations class, equivalent answers may look very different since arbitrary constants can obfuscate differences.

In my particular problem, I was looking at weights for Gauss-Hermite integration. I was trying to reconcile two different expressions for the weights, one in some software I’d written years ago and one given in Abramowitz and Stegun. I thought I’d found a bug, at least in my comments if not in my software. My confusion was analogous to not recognizing a trig identity. I wish I could say that the optical illusion link made me think that the two expressions may be the same and they just look different because of a mathematical illusion. That would make a good story. Instead, I discovered the equivalence of the two expressions by brute force, having Mathematica print out the values so I could compare them. Only later did I see the analogy between my problem and the optical illusion.

In case you’re interested in the details, my problem boiled down to the equivalence between *H*_{n+1}(*x _{i}*)

^{2}and 4

*n*

^{2}

*H*

_{n−1}(

*x*)

_{i}^{2}where

*H*(

_{n}*x*) is the

*n*th Hermite polynomial and

*x*is the

_{i}*i*th root of

*H*. Here’s why these are the same. The Hermite polynomials satisfy a recurrence relation

_{n}*H*_{n+1}(*x*) = 2*x* *H _{n}*(

*x*) − 2

*n*

*H*

_{n−1}(

*x*)

for all *x*. Since *H _{n}*(

*x*) = 0,

_{i}*H*

_{n+1}(

*x*) = −2

_{i}*nH*

_{n−1}(

*x*). Now square both sides.

**Related post**: Orthogonal polynomials

Cool! I can actually see it though if I squint and look at the top of the image. I see two shades of green though, not the same shade.

Wow, your blog audio is freaking good.

The speech software doesn’t read math expressions well, but it does a remarkable job on plain text. I like how it has natural inflection before punctuation.

I for one would like to hear that in the voice of Lt. Commander Data.

That’s a great analogy, John. Thanks for posting it. I’ll have to remember it.

The illusion is really neat too, but one thing that is interesting about the image that

you postedis that if you zoom in you’ll see that there are many more than three colors present! I don’t know if you or your blog software made the image smaller, but in the process of doing so, the compression changed the colors of most of the pixels (the stripes are so thin that most of the pixels are on or near a boundary, so they combine the colors in some way). I posted a zoomed-in versions of the original image (the one you linked to) and of your compressed image for you to see.Dave: Good point. I resized the original image, but I should have cropped it. I replaced my first image with a cropped version of the original.