# Happy Pythagoras Day!

I’d like to wish everyone a Happy Pythagoras Day! Today is 12/20/16 (or 20/12/16 in other parts of the world), and $20^2 = 12^2 + 16^2$.

Bonus points if you can figure out (without Googling) when the next three Pythagoras Days will be.

# Mathematical Present Wrapping (Part 2)

Yesterday’s post of mathematically wrapping presents was tongue in cheek. This one is elegant and a nice application of principles from geometry.

# Geometry and Halloween Costumes

From a friend’s Facebook post (shared with her permission):

For every time a geometry student asks, “When am I ever going to use this in real life?” Well, if your child ever asks you to make her a Harley Quinn costume, and there is no pattern, so you have to draft your own, you will need to find the sides of a square using the measurement of the diagonal…

[I]f you need to have a square patchwork of different colored fabrics which line up on diagonal points for a specific measurement so that you have four colored diagonal squares from the shoulder to just below the waist, you would need to find the measurement of the four equal sides of each square. Then you would add seam allowances so you could cut the squares out of the different colored fabrics and sew them together in exact lines to line up just right so you could make a top that looks like the top the character wears. And since this character is only a cartoon character who has been made into a little doll, not many people out there in the world have yet attempted an actual costume to be worn by a real live girl. Of course, a person could just take a pencil and a ruler and draw squares, but without using math, that person could not put together a patchwork of colored fabric squares with this result.

The finished product:

# Engaging students: Deriving the Pythagorean Theorem

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Emma Sivado. Her topic, from Geometry: deriving the Pythagorean Theorem.

How has this topic appeared in pop culture?

What if I told you that knowing the Pythagorean Theorem could help you become a millionaire? We’re all familiar with the popular game show “Who Wants to be a Millionaire” so let me take you back to 2007 when Ryan was playing for \$16,000. The question asks “which of these square numbers is the sum of two smaller square numbers.” We see the sweat immediately begin to accumulate on his brow as he struggles to find the right answer. He quickly goes to his life lines and asks the audience. The majority say the answer is 16. Ryan contemplates for a minute before going with the audience and selecting 16. Disappointment follows as we discover this is the wrong answer and Meredith explains that the answer is 25 or 42+32=52.

How can this topic be used in your student’s future courses in mathematics or science?

The Pythagorean Theorem is first taught in Geometry, according to the TEKS, and is expected to be defined, proved, and executed by these students. However, many people say that the Pythagorean Theorem is the basis of trigonometry, which is studied in depth in the student’s pre-calculus course. Beyond pre-calculus applications, the Pythagorean Theorem is used in physics to calculate kinetic energy, in computer science to compute processing time, and in social media to prove Metcalfe’s Law. Beyond math and science, the theorem is used in architecture and construction to determine distances, heights, and angles, in video games to draw in 3-D, and in triangulation to locate cell phone signals.

# The antiderivative of 1/(x^4+1): Part 9

In the course of evaluating the antiderivative

$\displaystyle \int \frac{1}{x^4 + 1} dx$,

I have stumbled across a very curious trigonometric identity:

$\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) -\pi$ if $x < x_2$,

$\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right)$ if $x_2 < x < x_1$,

$\tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1) = \tan^{-1} \left( \displaystyle \frac{x \sqrt{2}}{1 - x^2} \right) + \pi$ if $x> x_1$,

where $x_1$ and $x_2$ are the unique values so that

$\tan^{-1} ( x_1\sqrt{2} - 1 ) + \tan^{-1}( x_1 \sqrt{2} + 1) = \displaystyle \frac{\pi}{2}$,

$\tan^{-1} ( x_2\sqrt{2} - 1 ) + \tan^{-1}( x_2 \sqrt{2} + 1) = -\displaystyle \frac{\pi}{2}$.

I will now show that $x_1 = 1$ and $x_2 = -1$. Indeed, it’s apparent that these have to be the two transition points because these are the points where $\displaystyle \frac{x \sqrt{2}}{1 - x^2}$ is undefined. However, it would be more convincing to show this directly.

To show that $x_1 = 1$, I need to show that

$\tan^{-1} (\sqrt{2} - 1 ) + \tan^{-1}( \sqrt{2} + 1) = \displaystyle \frac{\pi}{2}$.

I could do this with a calculator…

…but that would be cheating.

Instead, let $\alpha = \tan^{-1} (\sqrt{2} - 1 )$ and $\beta = \tan^{-1} (\sqrt{2} + 1 )$, so that

$\tan \alpha = \sqrt{2} - 1$,

$\tan \beta = \sqrt{2} + 1$.

Indeed, by SOHCAHTOA, the angles $\alpha$ and $\beta$ can be represented in the figure below:

The two small right triangles make one large triangle, and I will show that the large triangle is also a right triangle. To do this, let’s find the lengths of the three sides of the large triangle. The length of the longest side is clearly $\sqrt{2} - 1 + \sqrt{2} + 1 = 2\sqrt{2}$. I will use the Pythagorean theorem to find the lengths of the other two sides. For the small right triangle containing $\alpha$, the missing side is

$\sqrt{ \left(\sqrt{2} - 1 \right)^2 + 1^2} = \sqrt{2 - 2\sqrt{2} + 1 + 1} = \sqrt{4-2\sqrt{2}}$

Next, for the small right triangle containing $\beta$, the missing side is

$\sqrt{ \left(\sqrt{2} + 1 \right)^2 + 1^2} = \sqrt{2 + 2\sqrt{2} + 1 + 1} = \sqrt{4+2\sqrt{2}}$

So let me redraw the figure, eliminating the altitude from the previous figure:

Notice that the condition of the Pythagorean theorem is satisfied, since

$\left( \sqrt{4-2\sqrt{2}} \right)^2 + \left( \sqrt{4+2\sqrt{2}} \right)^2 = 4 - 2\sqrt{2} + 4 + 2 \sqrt{2} = 8$,

or

$\left( \sqrt{4-2\sqrt{2}} \right)^2 + \left( \sqrt{4+2\sqrt{2}} \right)^2 = \left( 2\sqrt{2} \right)^2$.

Therefore, by the converse of the Pythagorean theorem, the above figure must be a right triangle (albeit a right triangle with sides of unusual length), and so $\alpha + \beta = \pi/2$. In other words, $x_1 = 1$, as required.

To show that $x_2 = -1$, I will show that the function $f(x) = \tan^{-1} ( x\sqrt{2} - 1 ) + \tan^{-1}( x \sqrt{2} + 1)$ is an odd function using the fact that $\tan^{-1} x$ is also an odd function:

$f(-x) = \tan^{-1} ( -x\sqrt{2} - 1 ) + \tan^{-1}( -x \sqrt{2} + 1)$

$= \tan^{-1} ( -[x\sqrt{2} + 1] ) + \tan^{-1}( -[x \sqrt{2} - 1])$

$= -\tan^{-1} ( x\sqrt{2} + 1 ) - \tan^{-1}( x \sqrt{2} - 1)$

$= - \left[ \tan^{-1} ( x\sqrt{2} + 1 ) + \tan^{-1}( x \sqrt{2} - 1) \right]$

$= -f(x)$.

Therefore, $f(-1) = -f(1) = -\displaystyle \frac{\pi}{2}$, and so $x_2 = -1$.

# Happy Pythagoras Day!

Let me take a one-day break from my current series of posts to wish everyone a Happy Pythagoras Day! Today is 8/17/15 (or 17/8/15 in other parts of the world), and $17^2 = 8^2 + 15^2$.

Bonus points if you can figure out (without Googling) when the next four Pythagoras Days will be. One of the next four is easy, two others aren’t so hard, but the fourth might take some thought.

# How I Impressed My Wife: Part 4d

Previously in this series, I have used two different techniques to show that

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x} = \displaystyle \frac{2\pi}{|b|}.$

Originally, my wife had asked me to compute this integral by hand because Mathematica 4 and Mathematica 8 gave different answers. At the time, I eventually obtained the solution by multiplying the top and bottom of the integrand by $\sec^2 x$ and then employing the substitution $u = \tan x$ (after using trig identities to adjust the limits of integration).
But this wasn’t the only method I tried. Indeed, I tried two or three different methods before deciding they were too messy and trying something different. So, for the rest of this series, I’d like to explore different ways that the above integral can be computed.
Here’s my progress so far:

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}$

$= \displaystyle \int_0^{2\pi} \frac{2 \, dx}{1+\cos 2x + 2 a \sin 2x + (a^2 + b^2)(1-\cos 2x)}$

$= 2 \displaystyle \int_0^{2\pi} \frac{d\theta}{(1+a^2+b^2) + 2 a \sin \theta + (1 - a^2 - b^2) \cos \theta}$

$= 2 \displaystyle \int_{0}^{2\pi} \frac{d\theta}{S + R \cos (\theta - \alpha)}$

$= 2 \displaystyle \int_{0}^{2\pi} \frac{d\phi}{S + R \cos \phi}$

$= \displaystyle -\frac{4i}{R} \oint_C \frac{dz}{z^2 + 2\frac{S}{R}z + 1}$

$= \displaystyle -\frac{4i}{R} \oint_C \frac{dz}{(z - r_1)(z- r_2)}$

where this last integral is taken over the complex plane on the unit circle, a closed contour oriented counterclockwise. Also,

$r_1 = \displaystyle \frac{-S + \sqrt{S^2 -R^2}}{R}$

and

$r_2 = \displaystyle \frac{-S - \sqrt{S^2 -R^2}}{R}$,

are the two distinct roots of the denominator (as long as $b \ne 0$). In these formulas,$R = \sqrt{(2a)^2 + (1-a^2-b^2)^2}$ and $S = 1 + a^2 + b^2$. (Also, $\alpha$ is a certain angle that is now irrelevant at this point in the calculation).

This contour integral looks more complicated; however, it’s an amazing fact that integrals over closed contours can be easily evaluated by only looking at the poles of the integrand. For this integral, that means finding the values of $z$ where the denominator is equal to 0, and then determining which of those values lie inside of the closed contour.

Let’s now see if either of the two roots of the denominator lies inside of the unit circle in the complex plane. In other words, let’s determine if $|r_1| < 1$ and/or $|r_2| < 1$.

I’ll begin with $r_1$. Clearly, the numbers $R$, $\sqrt{S^2-R^2}$, and $S$ are the lengths of three sides of a right triangle with hypotenuse $S$. So, since the hypotenuse is the longest side,

$S > \sqrt{S^2-R^2}$

or

$0 > -S + \sqrt{S^2-R^2}$

so that

$0 > \displaystyle \frac{-S + \sqrt{S^2-R^2}}{R}$.

Also, by the triangle inequality,

$R + \sqrt{S^2 - R^2} > S$

$-S + \sqrt{S^2 - R^2} > -R$

$\displaystyle \frac{-S + \sqrt{S^2-R^2}}{R} > -1$

Combining these inequalities, we see that

$-1 < \displaystyle \frac{-S + \sqrt{S^2-R^2}}{R} < 0$,

and so I see that $|r_1| < 1$, so that $r_1$ does lie inside of the contour $C$.

The second root $r_2$ is easier to handle:

$|r_2| = \left| \displaystyle \frac{-S - \sqrt{S^2 -R^2}}{R} \right| = \left| \displaystyle \frac{S + \sqrt{S^2 -R^2}}{R} \right| > \displaystyle \frac{S}{R} > 1$.

Therefore, since $r_2$ lies outside of the contour, this root is not important for the purposes of computing the above contour integral.

Now that I’ve identified the root that lies inside of the contour, I now have to compute the residue at this root. I’ll discuss this in tomorrow’s post.

# How I Impressed My Wife: Part 4c

Previously in this series, I have used two different techniques to show that

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x} = \displaystyle \frac{2\pi}{|b|}.$

Originally, my wife had asked me to compute this integral by hand because Mathematica 4 and Mathematica 8 gave different answers. At the time, I eventually obtained the solution by multiplying the top and bottom of the integrand by $\sec^2 x$ and then employing the substitution $u = \tan x$ (after using trig identities to adjust the limits of integration).
But this wasn’t the only method I tried. Indeed, I tried two or three different methods before deciding they were too messy and trying something different. So, for the rest of this series, I’d like to explore different ways that the above integral can be computed.
Here’s my progress so far:

$Q = \displaystyle \int_0^{2\pi} \frac{dx}{\cos^2 x + 2 a \sin x \cos x + (a^2 + b^2) \sin^2 x}$

$= \displaystyle \int_0^{2\pi} \frac{2 \, dx}{1+\cos 2x + 2 a \sin 2x + (a^2 + b^2)(1-\cos 2x)}$

$= 2 \displaystyle \int_0^{2\pi} \frac{d\theta}{(1+a^2+b^2) + 2 a \sin \theta + (1 - a^2 - b^2) \cos \theta}$

$= 2 \displaystyle \int_{0}^{2\pi} \frac{d\theta}{S + R \cos (\theta - \alpha)}$

$= 2 \displaystyle \int_{0}^{2\pi} \frac{d\phi}{S + R \cos \phi}$

$= \displaystyle -\frac{4i}{R} \oint_C \frac{dz}{z^2 + 2\frac{S}{R}z + 1}$,

where this last integral is taken over the complex plane on the unit circle, a closed contour oriented counterclockwise. Also, $R = \sqrt{(2a)^2 + (1-a^2-b^2)^2}$ and $S = 1 + a^2 + b^2$ (and $\alpha$ is a certain angle that is now irrelevant at this point in the calculation).

This contour integral looks more complicated; however, it’s an amazing fact that integrals over closed contours can be easily evaluated by only looking at the poles of the integrand. For this integral, that means finding the values of $z$ where the denominator is equal to 0, and then determining which of those values lie inside of the closed contour. In this case, that means finding which root(s) of the denominator lie inside the unit circle in the complex plane.

To begin, we use the quadratic formula to find the roots of the denominator:

$z^2 + 2\frac{S}{R}z + 1 = 0$

$Rz^2 + 2Sz + R = 0$

$z = \displaystyle \frac{-2S \pm \sqrt{4S^2 - 4R^2}}{2R}$

$z = \displaystyle \frac{-S \pm \sqrt{S^2 -R^2}}{R}$.

So we have the two roots $r_1 = \displaystyle \frac{-S + \sqrt{S^2 -R^2}}{R}$ and $r_2 = \displaystyle \frac{-S - \sqrt{S^2 -R^2}}{R}$. Earlier in this series, I showed that $S > R > 0$ as long as $b \ne 0$, and so the denominator has two distinct real roots. So the integral $Q$ may be rewritten as

$Q = \displaystyle -\frac{4i}{R} \oint_C \frac{dz}{(z - r_1)(z- r_2)}$

Next, we have to determine if either $r_1$ or $r_2$ (or both) lies inside of the contour. I’ll discuss this in tomorrow’s post.