My Favorite One-Liners: Part 49

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them. Today’s post is certainly not a one-liner but instead is my pseudohistory for how the roots of polynomials were found.

When I teach Algebra II or Precalculus (or train my  future high school teachers to teach these subjects), we eventually land on the Rational Root Test and Descartes’ Rule of Signs as an aid for finding the roots of cubic equations or higher. Before I get too deep into this subject, however, I like to give a 10-15 minute pseudohistory about the discovery of how polynomial equations can be solved. Historians of mathematics will certain take issue with some of this “history.” However, the main purpose of the story is not complete accuracy but engaging students with the history of mathematics. I think the story I tell engages students while remaining reasonably accurate… and I always refer students to various resources if they want to get the real history.

To begin, I write down the easiest two equations to solve (in all cases, a \ne 0:

ax + b = 0 \qquad and \qquad ax^2 + bx + c = 0

These are pretty easy to solve, with solutions well known to students:

x = -\displaystyle \frac{b}{a} \qquad and \qquad x = \displaystyle \frac{-b \pm \sqrt{b^2-4ac}}{2a}

In other words, there are formulas that you can just stick in the coefficients and get the answer out without thinking too hard. Sure, there are alternate ways of solving for x that could be easier, like factoring, but the worst-case scenario is just plugging into the formula.

These formulas were known to Babylonian mathematicians around 2000 B.C. (When I teach this in class, I write the date, and all other dates and discoverers, next to the equations for dramatic pedagogical effect.) Though not written in these modern terms, basically every ancient culture on the globe that did mathematics had some version of these formulas: for example, the ancient Egyptians, Greeks, Chinese, and Mayans.

Naturally, this leads to a simple question: is there a formula for the cubic:

ax^3 + bx^2 + cx + d = 0

Is there some formula that we can just plug a, b, c, and d to just get the answer?  The answer is, Yes, there is a formula. But it’s nasty. The formula was not discovered until 1535 A.D., and it was discovered by a man named Tartaglia. During the 1500s, the study of mathematics was less about the dispassionate pursuit of truth and more about exercising machismo. One mathematician would challenge another: “Here’s my cubic equation; I bet you can’t solve it. Nyah-nyah-nyah-nyah-nyah.” Then the second mathematician would solve it and challenge the first: “Here’s my cubic equation; I bet you can’t solve it. Nyah-nyah-nyah-nyah-nyah.” And so on. Well, Tartaglia came up with a formula that would solve every cubic equation. By plugging in a, b, c, and d, you get the answer out.

Tartaglia’s discovery was arguably the first triumph of the European Renaissance. The solution of the cubic was perhaps the first thing known to European mathematicians in the Middle Ages that was unknown to the ancient Greeks.

In 1535, Tartaglia was a relatively unknown mathematician, and so he told a more famous mathematician, Cardano, about his formula. Cardano told Tartaglia, why yes, that is very interesting, and then published the formula under his own name, taking credit without mention of Tartaglia. To this day, the formula is called Cardano’s formula.

So there is a formula. But it would take an entire chalkboard to write down the formula. That’s why we typically don’t make students learn this formula in high school; it’s out there, but it’s simply too complicated to expect students to memorize and use.

This leads to the next natural question: what about quartic equations?

ax^4 + bx^3 + cx^2 + dx + e = 0

The solution of the quartic was discovered less than five years later by an Italian mathematician named Ferrari. Ferrari found out that there is a formula that you can just plug in a, b, c, d, and e, turn the crank, and get the answers out. Writing out this formula would take two chalkboards. So there is a formula, but it’s also very, very complicated.

Of course, Ferrari had some famous descendants in the automotive industry.

So now we move onto my favorite equation, the quintic. (If you don’t understand why it’s my favorite, think about my last name.)

ax^5 + bx^4 + cx^3 + dx^2 + ex + f = 0

After solving the cubic and quartic in rapid succession, surely there should also be a formula for the quintic. So they tried, and they tried, and they tried, and they got nowhere fast. Finally, the problem was solved nearly 300 years later, in 1832 (for the sake telling a good story, I don’t mention Abel) by a French kid named Evariste Galois. Galois showed that there is no formula. That takes some real moxie. There is no formula. No matter how hard you try, you will not find a formula that can work for every quintic. Sure, there are some quintics that can be solved, like x^5 = 0. But there is no formula that will work for every single quintic.

Galois made this discovery when he was 19 years old… in other words, approximately the same age as my students. In fact, we know when wrote down his discovery, because it happened the night before he died. You see, he was living in France in 1832. What was going on in France in 1832? I ask my class, have they seen Les Miserables?

France was torn upside-down in 1832 in the aftermath of the French Revolution, and young Galois got into a heated argument with someone over politics; Galois was a republican, while the other guy was a royalist. More importantly, both men were competing for the hand of the same young woman. So they decided to settle their differences like honorable Frenchmen, with a duel. So Galois wrote up his mathematical notes one night, and the next day, he fought the duel, he lost the duel, and he died.

Thus giving complete and total proof that tremendous mathematical genius does not prevent somebody from being a complete idiot.

For the present, there are formulas for cubic and quartic equations, but they’re long and impractical. And for quintic equations and higher, there is no formula. So that’s why we teach these indirect methods like the Rational Root Test and Descartes’ Rule of Signs, as they give tools to use to guess at the roots of higher-order polynomials without using something like the quadratic formula.

green lineReal references:

http://mathworld.wolfram.com/QuadraticEquation.html

http://mathworld.wolfram.com/CubicFormula.html

http://mathworld.wolfram.com/QuarticEquation.html

http://mathworld.wolfram.com/AbelsImpossibilityTheorem.html

http://mathworld.wolfram.com/QuinticEquation.html

http://library.wolfram.com/examples/quintic/

http://library.wolfram.com/examples/quintic/timeline.html

My Favorite One-Liners: Part 28

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them. Today’s quip is one that I’ll use when simple techniques get used in a complicated way.

Consider the solution of the linear recurrence relation

Q_n = Q_{n-1} + 2 Q_{n-2},

where F_0 = 1 and F_1 = 1. With no modesty, I call this one the Quintanilla sequence when I teach my students — the forgotten little brother of the Fibonacci sequence.

To find the solution of this linear recurrence relation, the standard technique — which is a pretty long procedure — is to first solve the characteristic equation, from Q_n - Q_{n-1} - 2 Q_{n-2} = 0, we obtain the characteristic equation

r^2 - r - 2 = 0

This can be solved by any standard technique at a student’s disposal. If necessary, the quadratic equation can be used. However, for this one, the left-hand side simply factors:

(r-2)(r+1) = 0

r=2 \qquad \hbox{or} \qquad r = -1

(Indeed, I “developed” the Quintanilla equation on purpose, for pedagogical reasons, because its characteristic equation has two fairly simple roots — unlike the characteristic equation for the Fibonacci sequence.)

From these two roots, we can write down the general solution for the linear recurrence relation:

Q_n = \alpha_1 \times 2^n + \alpha_2 \times (-1)^n,

where \alpha_1 and \alpha_2 are constants to be determined. To find these constants, we plug in n =0:

Q_0 = \alpha_1 \times 2^0 + \alpha_2 \times (-1)^0.

To find these constants, we plug in n =0:

Q_0 = \alpha_1 \times 2^0 + \alpha_2 \times (-1)^0.

We then plug in n =1:

Q_1 = \alpha_1 \times 2^1 + \alpha_2 \times (-1)^1.

Using the initial conditions gives

1 = \alpha_1 + \alpha_2

1 = 2 \alpha_1 - \alpha_2

This is a system of two equations in two unknowns, which can then be solved using any standard technique at the student’s disposal. Students should quickly find that \alpha_1 = 2/3 and \alpha_2 = 1/3, so that

Q_n = \displaystyle \frac{2}{3} \times 2^n + \frac{1}{3} \times (-1)^n = \frac{2^{n+1} + (-1)^n}{3},

which is the final answer.

Although this is a long procedure, the key steps are actually first taught in Algebra I: solving a quadratic equation and solving a system of two linear equations in two unknowns. So here’s my one-liner to describe this procedure:

This is just an algebra problem on steroids.

Yes, it’s only high school algebra, but used in a creative way that isn’t ordinarily taught when students first learn algebra.

I’ll use this “on steroids” line in any class when a simple technique is used in an unusual — and usually laborious — way to solve a new problem at the post-secondary level.

 

 

My Favorite One-Liners: Part 19

In this series, I’m compiling some of the quips and one-liners that I’ll use with my students to hopefully make my lessons more memorable for them. This is a quip that I’ll use when a theoretical calculation can be easily confirmed with a calculator. Today’s post is less of a one-liner than a story.

When I teach Algebra II or Precalculus (or train my  future high school teachers to teach these subjects), we eventually land on the Rational Root Test and Descartes’ Rule of Signs as an aid for finding the roots of cubic equations or higher. Before I get too deep into this subject, however, I like to give a 10-15 minute pseudohistory about the discovery of how polynomial equations can be solved. Historians of mathematics will certain take issue with some of this “history.” However, the main purpose of the story is not complete accuracy but engaging students with the history of mathematics. I think the story I tell engages students while remaining reasonably accurate… and I always refer students to various resources if they want to get the real history.

To begin, I write down the easiest two equations to solve (in all cases, a \ne 0:

ax + b = 0 \qquad and \qquad ax^2 + bx + c = 0

These are pretty easy to solve, with solutions well known to students:

x = -\displaystyle \frac{b}{a} \qquad and \qquad x = \displaystyle \frac{-b \pm \sqrt{b^2-4ac}}{2a}

In other words, there are formulas that you can just stick in the coefficients and get the answer out without thinking too hard. Sure, there are alternate ways of solving for x that could be easier, like factoring, but the worst-case scenario is just plugging into the formula.

These formulas were known to Babylonian mathematicians around 2000 B.C. (When I teach this in class, I write the date, and all other dates and discoverers, next to the equations for dramatic pedagogical effect.) Though not written in these modern terms, basically every ancient culture on the globe that did mathematics had some version of these formulas: for example, the ancient Egyptians, Greeks, Chinese, and Mayans.

Naturally, this leads to a simple question: is there a formula for the cubic:

ax^3 + bx^2 + cx + d = 0

Is there some formula that we can just plug a, b, c, and d to just get the answer?  The answer is, Yes, there is a formula. But it’s nasty. The formula was not discovered until 1535 A.D., and it was discovered by a man named Tartaglia. During the 1500s, the study of mathematics was less about the dispassionate pursuit of truth and more about exercising machismo. One mathematician would challenge another: “Here’s my cubic equation; I bet you can’t solve it. Nyah-nyah-nyah-nyah-nyah.” Then the second mathematician would solve it and challenge the first: “Here’s my cubic equation; I bet you can’t solve it. Nyah-nyah-nyah-nyah-nyah.” And so on. Well, Tartaglia came up with a formula that would solve every cubic equation. By plugging in a, b, c, and d, you get the answer out.

Tartaglia’s discovery was arguably the first triumph of the European Renaissance. The solution of the cubic was perhaps the first thing known to European mathematicians in the Middle Ages that was unknown to the ancient Greeks.

In 1535, Tartaglia was a relatively unknown mathematician, and so he told a more famous mathematician, Cardano, about his formula. Cardano told Tartaglia, why yes, that is very interesting, and then published the formula under his own name, taking credit without mention of Tartaglia. To this day, the formula is called Cardano’s formula.

So there is a formula. But it would take an entire chalkboard to write down the formula. That’s why we typically don’t make students learn this formula in high school; it’s out there, but it’s simply too complicated to expect students to memorize and use.

This leads to the next natural question: what about quartic equations?

ax^4 + bx^3 + cx^2 + dx + e = 0

The solution of the quartic was discovered less than five years later by an Italian mathematician named Ferrari. Ferrari found out that there is a formula that you can just plug in a, b, c, d, and e, turn the crank, and get the answers out. Writing out this formula would take two chalkboards. So there is a formula, but it’s also very, very complicated.

Of course, Ferrari had some famous descendants in the automotive industry.

So now we move onto my favorite equation, the quintic. (If you don’t understand why it’s my favorite, think about my last name.)

ax^5 + bx^4 + cx^3 + dx^2 + ex + f = 0

After solving the cubic and quartic in rapid succession, surely there should also be a formula for the quintic. So they tried, and they tried, and they tried, and they got nowhere fast. Finally, the problem was solved nearly 300 years later, in 1832 (for the sake telling a good story, I don’t mention Abel) by a French kid named Evariste Galois. Galois showed that there is no formula. That takes some real moxie. There is no formula. No matter how hard you try, you will not find a formula that can work for every quintic. Sure, there are some quintics that can be solved, like x^5 = 0. But there is no formula that will work for every single quintic.

Galois made this discovery when he was 19 years old… in other words, approximately the same age as my students. In fact, we know when wrote down his discovery, because it happened the night before he died. You see, he was living in France in 1832. What was going on in France in 1832? I ask my class, have they seen Les Miserables?

France was torn upside-down in 1832 in the aftermath of the French Revolution, and young Galois got into a heated argument with someone over politics; Galois was a republican, while the other guy was a royalist. More importantly, both men were competing for the hand of the same young woman. So they decided to settle their differences like honorable Frenchmen, with a duel. So Galois wrote up his mathematical notes one night, and the next day, he fought the duel, he lost the duel, and he died.

Which bring me to the conclusion of this story: we have complete and total proof that tremendous mathematical genius does not prevent somebody from being a complete idiot.

For the present, there are formulas for cubic and quartic equations, but they’re long and impractical. And for quintic equations and higher, there is no formula. So that’s why we teach these indirect methods like the Rational Root Test and Descartes’ Rule of Signs, as they give tools to use to guess at the roots of higher-order polynomials without using something like the quadratic formula.

green lineReal references:

http://mathworld.wolfram.com/QuadraticEquation.html

http://mathworld.wolfram.com/CubicFormula.html

http://mathworld.wolfram.com/QuarticEquation.html

http://mathworld.wolfram.com/AbelsImpossibilityTheorem.html

http://mathworld.wolfram.com/QuinticEquation.html

http://library.wolfram.com/examples/quintic/

http://library.wolfram.com/examples/quintic/timeline.html

Engaging students: The quadratic formula

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 again comes from my former student Storm Boykin. Her topic, from Algebra II: the quadratic formula.

green line

How could you as a teacher create an activity or project that involves your topic?

Learning the Quadratic Formula can be quite a tedious process for students. They have to learn the why and how, but still need to be able to recall the Quadratic Formula fairly quickly. Students cannot use it as a tool to solve quadratic equations if they cannot remember it. The chart below is to be a card sort from a mnemonic device that was passed down by a former teacher. The idea is that the students will have these cards mixed up, and then they will have to match the story with its’ mathematical counterpart. Then, using the mnemonic device, the student can put the story in order, and will have the quadratic formula before their eyes.

 

The negative boy -b
couldn’t decide ±
if he wanted to go to the radical party  √
but the boy was square b^2
and missed out on four awesome chicks -4ac
it was all over by two am /2a

 

green line

What interesting things can you say about the people who contributed to the discovery and/or the development of this topic?

Quadratics began to come about around 2000 BCE because mathematicians needed a way to make “architectural floor and wall plans.” Quadratics have been worked on by various cultures since then. While working on quadratics, Pythagorus found that the square root of a number did not have to be an integer. However, he didn’t believe that imaginary numbers existed, and had one of his associates killed for even suggesting to the public that “non- integers” existed. They idea of a quadratic formula was touched on by hindu and islamic mathematicians, but did not come into form as our modern day formula until 1637, when Rene Descartes published it in his geometric works.

https://musingsonmath.files.wordpress.com/2011/08/history-quadratic-formula.pdf

 

green line

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

All algebra and calculus courses will have quadratic equations in them. Students will have a much easier Physics experience if they have the equation at their disposal. Quadratics are used to calculate velocity and height of objects in the air. Real world examples involving velocity and height are the perfect blend of physics and science! Students will also need the quadratic formula for the SAT and PSAT.

 

 

 

How I Impressed My Wife: Part 6g

This series was inspired by a question that my wife asked me: calculate

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

Originally, I multiplied the top and bottom of the integrand by \tan^2 x and performed a substitution. However, as I’ve discussed in this series, there are four different ways that this integral can be evaluated.
Starting with today’s post, I’ll begin a fifth method. I really like this integral, as it illustrates so many different techniques of integration as well as the trigonometric tricks necessary for computing some integrals.

green lineSince Q is independent of a, I can substitute any convenient value of a that I want without changing the value of Q. As shown in previous posts, substituting a =0 yields the following simplification:

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{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}

= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}

= \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}

= 2\pi i \left[\displaystyle \frac{r_1}{r_1^2-1} + \displaystyle \frac{r_2}{r_2^2-1} \right],

where I’ve made the assumption that |b| < 1. In the above derivation, C_R is the contour in the complex plane shown below (graphic courtesy of Mathworld).

Also,

r_1 = \sqrt{1-b^2} + |b|i

and

r_2 = -\sqrt{1-b^2} + |b|i

are the two poles of the final integrand that lie within this contour.

It now remains to simplify the final algebraic expression. To begin, I note

\displaystyle \frac{r_1}{r_1^2-1} = \displaystyle \frac{\sqrt{1-b^2} + |b|i}{[\sqrt{1-b^2} + |b|i]^2 - 1}

= \displaystyle \frac{\sqrt{1-b^2} + |b|i}{1-b^2 + 2|b|i\sqrt{1-b^2} - |b|^2 - 1}

= \displaystyle \frac{\sqrt{1-b^2} + |b|i}{-2|b|^2 + 2|b|i\sqrt{1-b^2}}

= \displaystyle \frac{\sqrt{1-b^2} + |b|i}{2|b|i(|b|i +\sqrt{1-b^2})}

= \displaystyle \frac{1}{2|b|i}.

Similarly,

\displaystyle \frac{r_2}{r_2^2-1} = \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{[-\sqrt{1-b^2} + |b|i]^2 - 1}

= \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{1-b^2 - 2|b|i\sqrt{1-b^2} - |b|^2 - 1}

= \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{-2|b|^2 - 2|b|i\sqrt{1-b^2}}

= \displaystyle \frac{-\sqrt{1-b^2} + |b|i}{2|b|i(|b|i -\sqrt{1-b^2})}

= \displaystyle \frac{1}{2|b|i}.

Therefore,

Q = 2\pi i \left[\displaystyle \frac{r_1}{r_1^2-1} + \displaystyle \frac{r_2}{r_2^2-1} \right] = 2\pi i \left[ \displaystyle \frac{1}{2|b|i} + \frac{1}{2|b| i} \right] = 2\pi i \displaystyle \frac{2}{2|b|i} = \displaystyle \frac{2\pi}{|b|}.

green lineAnd so, at long last, I’ve completed a fifth different evaluation of Q.

How I Impressed My Wife: Part 6f

This series was inspired by a question that my wife asked me: calculate

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

Originally, I multiplied the top and bottom of the integrand by \tan^2 x and performed a substitution. However, as I’ve discussed in this series, there are four different ways that this integral can be evaluated.
Starting with today’s post, I’ll begin a fifth method. I really like this integral, as it illustrates so many different techniques of integration as well as the trigonometric tricks necessary for computing some integrals.

green lineSince Q is independent of a, I can substitute any convenient value of a that I want without changing the value of Q. As shown in previous posts, substituting a =0 yields the following simplification:

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{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}

= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}

= \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1},

where C_R is the contour in the complex plane shown below (graphic courtesy of Mathworld).

Amazingly, contour integrals can be simply computed by evaluating the residues at every pole located inside of the contour. (See Wikipedia and Mathworld for more details.) I have already handled the case of |b| = 1 and |b| > 1. Today, I begin the final case of |b| < 1.

Earlier in this series, I showed that

z^4 + (4b^2 - 2) z^2 + 1 = (z^2 + 2z \sqrt{1-b^2} + 1)(z^2 - 2z \sqrt{1-b^2} + 1)

if |b| < 1, and so the quadratic formula can be used to find the four poles of the integrand:

r_1 = \sqrt{1-b^2} + |b|i,

r_2 = -\sqrt{1-b^2} + |b|i,

r_3 = \sqrt{1-b^2} - |b|i,

r_4 = -\sqrt{1-b^2} - |b|i.

Of these, only two lie (r_1 and r_2) within the contour for sufficiently large R (actually, for R > 1 since all four poles lie on the unit circle in the complex plane).

As shown earlier in this series, the residue at each pole is given by

\displaystyle \frac{r^2 + 1}{2r^3 + (4b^2-2)r}

I’ll now simplify this considerably by using the fact that r^4 + (4b^2-2)r^2 + 1 = 0 at each pole:

\displaystyle \frac{r^2 + 1}{2r^3 + (4b^2-2)r} = \displaystyle \frac{r(r^2+1)}{2r^4+(4b^2)-r^2}

= \displaystyle \frac{r(r^2+1)}{r^4+r^4 + (4b^2)-r^2}

= \displaystyle \frac{r(r^2+1)}{r^4-1}

= \displaystyle \frac{r(r^2+1)}{(r^2+1)(r^2-1)}

= \displaystyle \frac{r}{r^2-1}.

Therefore, to evaluate the contour integral, I simply the sum of the residues within the contour and multiply the sum by 2\pi i:

Q = \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1} = 2\pi i \left[\displaystyle \frac{r_1}{r_1^2-1} + \displaystyle \frac{r_2}{r_2^2-1} \right].

green lineSo, to complete the evaluation of Q, I need to simplify the right-hand side. I’ll complete this in tomorrow’s post.

How I Impressed My Wife: Part 6d

This series was inspired by a question that my wife asked me: calculate

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

Originally, I multiplied the top and bottom of the integrand by \tan^2 x and performed a substitution. However, as I’ve discussed in this series, there are four different ways that this integral can be evaluated.
Starting with today’s post, I’ll begin a fifth method. I really like this integral, as it illustrates so many different techniques of integration as well as the trigonometric tricks necessary for computing some integrals.

 nvenient value of a that I want without changing the value of Q. As shown in previous posts, substituting a =0 yields the following simplification:

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{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}

= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}

= \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1}

= 2\pi \displaystyle \left[ \frac{1-r_1^2}{-2r_1^3 + (4b^2-2) r_1} +\frac{1-r_2^2}{-2r_2^3 + (4b^2-2) r_2} \right]

where I’ve assumed |b| > 1, the contour C_R in the complex plane is shown below (graphic courtesy of Mathworld),

and the positive constants r_1 and r_2 are given by

r_1 = \sqrt{2b^2 - 1 + 2|b| \sqrt{b^2 - 1}},

r_2 = \sqrt{2b^2 - 1 - 2|b| \sqrt{b^2 - 1}}.

Now we have the small matter of simplifying our expression for Q. Actually, this isn’t a small matter because Mathematica 10.1 is not able to simplify this expression much at all:

ResidueCalculation

Fortunately, humans can still do some things that computers can’t. As observed yesterday, The numbers r_1 and r_2 are chosen so that \pm ir_1 and \pm ir_2 are the roots of the denominator z^4 + (4 b^2 - 2) z^2 + 1, so that

r_1^2 + r_2^2 = 4b^2 - 2,

r_1 r_2 = 1.

These relationships will be very handy for simplifying our expression for Q:

Q = 2\pi \displaystyle \left[ \frac{1-r_1^2}{-2r_1^3 + (4b^2-2) r_1} +\frac{1-r_2^2}{-2r_2^3 + (4b^2-2) r_2} \right]

= 2\pi \left[ \displaystyle \frac{1-r_1^2}{r_1 (-2r_1^2 + 4b^2-2)} + \frac{1-r_2^2}{r_2(-2r_2^2 + 4b^2-2)} \right]

= 2\pi \left[ \displaystyle \frac{1-r_1^2}{r_1 (-2r_1^2 +r_1^2 + r_2^2)} + \frac{1-r_2^2}{r_2(-2r_2^2 + r_1^2 + r_2^2)} \right]

= 2\pi \left[ \displaystyle \frac{1-r_1^2}{r_1 (-r_1^2 +r_2^2)} + \frac{1-r_2^2}{r_2(r_1^2 -r_2^2)} \right]

 = 2\pi \left[ \displaystyle \frac{r_1^2-1}{r_1 (r_1^2 -r_2^2)} + \frac{1-r_2^2}{r_2(r_1^2 -r_2^2)} \right]

= 2\pi \displaystyle \frac{(r_1^2-1)r_2 + r_1(1-r_2^2)}{r_1 r_2 (r_1^2 -r_2^2)}

 = 2\pi \displaystyle \frac{r_1^2 r_2- r_2 + r_1- r_1 r_2^2)}{r_1 r_2 (r_1^2 -r_2^2)}

= 2\pi \displaystyle \frac{r_1 - r_2 + r_1 r_2 (r_1 - r_2)}{r_1 r_2 (r_1-r_2)(r_1 + r_2)}

= 2\pi \displaystyle \frac{(r_1 - r_2)(1 + r_1 r_2)}{r_1 r_2 (r_1-r_2)(r_1 + r_2)}

= 2\pi \displaystyle \frac{1 + r_1 r_2}{r_1 r_2 (r_1 + r_2)}

= 2\pi \displaystyle \frac{1 + 1}{1 \cdot (r_1 + r_2)}

= \displaystyle \frac{4\pi}{r_1 + r_2}

To complete the calculation, I observe that

(r_1 + r_2)^2 = r_1^2 + 2r_1 r_2 + r_2^2 = 4b^2 -2 + 2 = 4b^2,

so that

r_1 + r_2 = 2|b|.

Therefore,

Q = \displaystyle \frac{4\pi}{r_1 + r_2} = \displaystyle \frac{4\pi}{2|b|} = \displaystyle \frac{2\pi}{|b|}.

green line

In tomorrow’s post, I’ll present another way to simplify this nasty algebraic expression.

How I Impressed My Wife: Part 6c

This series was inspired by a question that my wife asked me: calculate

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

Originally, I multiplied the top and bottom of the integrand by \tan^2 x and performed a substitution. However, as I’ve discussed in this series, there are four different ways that this integral can be evaluated.
Starting with today’s post, I’ll begin a fifth method. I really like this integral, as it illustrates so many different techniques of integration as well as the trigonometric tricks necessary for computing some integrals.

green lineSince Q is independent of a, I can substitute any convenient value of a that I want without changing the value of Q. As shown in previous posts, substituting a =0 yields the following simplification:

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{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}

= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}

= \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1},

where C_R is the contour in the complex plane shown below (graphic courtesy of Mathworld).

Amazingly, contour integrals can be simply computed by evaluating the residues at every pole located inside of the contour. (See Wikipedia and Mathworld for more details.) I handled the case of |b| = 1 in yesterday’s post. Today, I’ll begin the case of |b| > 1.

To find the poles of the integrand, I use the quadratic formula to set the denominator equal to zero:

z^4 + (4 b^2 - 2) z^2 + 1 = 0

z^2 = \displaystyle \frac{2-4b^2 \pm \sqrt{(4b^2-2)^2 - 4}}{2}

z^2 = \displaystyle \frac{2-4b^2 \pm \sqrt{16b^4 - 16b^2 + 4 - 4}}{2}

z^2 = \displaystyle \frac{2-4b^2 \pm \sqrt{16b^4 - 16b^2}}{2}

z^2 = \displaystyle \frac{2-4b^2 \pm 4|b| \sqrt{b^2 - 1}}{2}

z^2 = 1-2b^2 \pm 2|b| \sqrt{b^2 - 1}

As shown earlier in this series, the right-hand side is negative if |b| > 1. So, for the sake of simplicity, I’ll define

r_1 = \sqrt{2b^2 - 1 + 2|b| \sqrt{b^2 - 1}},

r_2 = \sqrt{2b^2 - 1 - 2|b| \sqrt{b^2 - 1}},

so that the four poles of the integrand are ir_1, ir_2, -ir_1, and -ir_2. Of these, only two (ir_1 and ir_2) lie within the contour for sufficiently large R, and so I’ll need to compute the residues for these two poles.

Before starting that task, I notice that

z^4 + (4 b^2 - 2) z^2 + 1 = (z - ir_1)(z + ir_1)(z - ir_2)(z + ir_2),

or

z^4 + (4b^2 - 2)z^2 + 1 = (z^2 + r_1^2)(z^2 + r_2^2),

or

z^4 + (4b^2 -2)z^2 + 1 = z^4 + (r_1^2 + r_2^2) z^2 + r_1^2 r_2^2.

Matching coefficients, I see that

r_1^2 + r_2^2 = 4b^2 - 2,

r_1^2 r_2^2 = 1.

These will become very handy later in the calculation.

The integrand has the form \displaystyle g(z)/h(z), and each pole has order one. As shown earlier in this series, the residue at such pole is equal to

\displaystyle \frac{g(r)}{h'(r)}.

In this case, g(z) = 2(1+z^2) and h(z) = z^4 + (4b^2-2)z^2 + 1 so that h'(z) = 4z^3 + 2(4b^2-2)z, and so the residue at r_1 and r_2 are given by

\displaystyle \frac{2(1+[ir_1]^2)}{4 [ir_1]^3 + 2(4b^2-2) [ir_1]} = \displaystyle \frac{-i(1-r_1^2)}{-2r_1^3 + (4b^2-2) r_1}

and

\displaystyle \frac{2(1+[ir_2]^2)}{4 [ir_2]^3 + 2(4b^2-2) [ir_2]} = \displaystyle \frac{-i(1-r_2^2)}{-2r_2^3 + (4b^2-2) r_2}

Finally, to evaluate the contour integral, I simply the sum of the residues within the contour and then multiply the sum by 2\pi i:

Q = \displaystyle \lim_{R \to \infty} \oint_{C_R} \frac{ 2(1+z^2) dz}{z^4 + (4 b^2 - 2) z^2 + 1} = 2\pi i \left[\frac{-i(1-r_1^2)}{-2r_1^3 + (4b^2-2) r_1} +\frac{-i(1-r_2^2)}{-2r_2^3 + (4b^2-2) r_2} \right]

= 2\pi \displaystyle \left[ \frac{1-r_1^2}{-2r_1^3 + (4b^2-2) r_1} +\frac{1-r_2^2}{-2r_2^3 + (4b^2-2) r_2} \right]

 

green lineSo, to complete the evaluation of Q, I’m left with the small matter of simplifying the right-hand side. I’ll tackle this in tomorrow’s post.

How I Impressed My Wife: Part 5e

Earlier in this series, I gave three different methods of showing 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|}.

Using the fact that Q is independent of a, I’ll now give a fourth method.
green lineSince Q is independent of a, I can substitute any convenient value of a that I want without changing the value of Q. As shown in previous posts, substituting a =0 yields the following simplification:

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{dx}{\cos^2 x + 2 \cdot 0 \cdot \sin x \cos x + (0^2 + b^2) \sin^2 x}

= \displaystyle \int_{0}^{2\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\pi}^{\pi} \frac{dx}{\cos^2 x + b^2 \sin^2 x}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}

To evaluate this integral, I need to find the four complex roots of the denominator:

u^4 + (4b^2 - 2) u^2 + 1 = 0

u^2 = \displaystyle \frac{ 2 - 4b^2 \pm \sqrt{(4b^2 - 2)^2 - 4}}{2}

u^2 = \displaystyle \frac{2 - 4b^2 \pm \sqrt{16b^4 - 16b^2 - 4 + 4}}{2}

u^2 = \displaystyle \frac{2 - 4b^2 \pm \sqrt{16b^4 - 16b^2}}{2}

u^2 = \displaystyle \frac{2 - 4b^2 \pm 4|b| \sqrt{b^2 - 1}}{2}

u^2 = \displaystyle 1 - 2b^2 \pm 2|b| \sqrt{b^2 - 1}

To solve for u, there are three separate cases that have to be considered: |b| = 1, |b| > 1, and |b| < 1. I’ll begin with the easiest case of |b| = 1. In this case, the integral Q is easy to evaluate:

= Q \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 b^2 - 2) u^2 + 1}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + (4 \cdot [1^2] - 2) u^2 + 1}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{u^4 + 2 u^2 + 1}

= \displaystyle \int_{-\infty}^{\infty} \frac{ 2(1+u^2) du}{(1+u^2)^2}

=\displaystyle \int_{-\infty}^{\infty} \frac{ 2 du}{1+u^2}

=\displaystyle \left[ 2\tan^{-1} x \right]^{\infty}_{-\infty}

=\displaystyle \left[ 2 \frac{\pi}{2} - 2 \frac{-\pi}{2} \right]

= 2\pi

This matches the expected answer of Q = \displaystyle \frac{2\pi}{|b|} since I used the assumption that |b| = 1.

green line

I’ll continue with this fourth evaluation of the integral, examining the two remaining cases, in future posts.

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.
green lineHere’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)}

green line

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.