Engaging students: Solving linear systems of equations with matrices

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 Andrew Sansom. His topic, from Algebra II: solving linear systems of equations with matrices.

green line

A1. What interesting (i.e., uncontrived) word problems using this topic can your students do now? (You may find resources such as http://www.spacemath.nasa.gov to be very helpful in this regard; feel free to suggest others.)

The Square in Downtown Denton is a popular place to visit and hang out. A new business owner needs to decide which road he should put an advertisement so that the most people will see it as they drive by. He does not have enough resources to traffic every block and street, but he knows that he can use algebra to solve for the ones he missed. In the above map, he put a blue box that contains the number of people that walked on each street during one hour. Use a system of linear equations to determine how much traffic is on every street/block on this map.

HINT: Remember that in every intersection, the same number of people have to walk in and walk out each hour, so write an equation for each intersection that has the sum of people walking in is equal to the number of people walking out.
HINT: Remember that the same people enter and exit the entire map every hour. Write an equation that has the sum of each street going into the map equal to the sum of each street going out of the map.

Solution:

1. Build each equation, as suggested by the hints.

2. Rewrite the system of simultaneous linear equations in standard form.

3. Rewrite the system as an augmented matrix

4. Reduce the system to Reduced Row Echelon Form (using a calculator)

 


5. Use this reduced matrix to find solutions for each variable

 

This gives us a completed map:

 


Clearly, the business owner should advertise on Hickory Street between Elm and Locust St (Possibly in front of Beth Marie’s).

 

green line

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

Systems of Simultaneous Linear Equations appear frequently in most problems that involve modelling more than one thing at a time. In high school, the ability to use matrices to solve such systems (especially large ones) simply many problems that would appear in AP or IB Physics exams. Circuit Analysis (including Kirchhof’s and Ohm’s laws) frequently amounts to setting up large systems of simultaneous equations similar to the above network traffic problem. Similarly, there are kinematics problems where multiple forces/torques acting on an object that naturally lend themselves to large systems of equations.

In chemistry, mixture problems can be solved using systems of equations. If more than substance is being mixed, then the system can become too large to efficiently solve except by Gaussian Elimination and matrix operations. (DeFreese, n.d.)

At the university level, learning to solve systems using matrices prepares the student for Linear Algebra, which is useful in almost every math class taken thereafter.

 

 

green line

D4. What are the contributions of various cultures to this topic?

Simultaneous linear equations were featured in Ancient China in a text called Jiuzhang Suanshu or Nine Chapters of the Mathematical Art to solve problems involving weights and quantities of grains. The method prescribed involves listing the coefficients of terms in an array is exceptionally similar to Gaussian Elimination.

Later, in early modern Europe, the methods of elimination were known, but not taught in textbooks until Newton published such an English text in 1720, though he did not use matrices in that text. Gauss provided an even more systematic approach to solving simultaneous linear equations involving least squares by 1794, which was used in 1801 to find Ceres when it was sighted and then lost. During Gauss’s lifetime and in the century that followed, Gauss’s method of elimination because a standard way of solving large systems for human computers. Furthermore, by adopting brackets, “Gauss relieved computers of the tedium of having to rewrite equations, and in so doing, he enabled them to consider how to best organize their work.” (Grcar J. F., 2011).

The use of matrices in elimination appeared in 1895 with Wilhelm Jordan and 1888 by B.I. Clasen. Since then, the method we use today has become commonly attributed to Jordan and commemorated with the name “Gauss-Jordan Method”.
References:
DeFreese, C. (n.d.). Mixture Problems. Retrieved from University of Missouri-St. Louis–Department of Mathematics and Computer Science: http://www.umsl.edu/~defreeseca/intalg/ch8extra/mixture.htm
Grcar, J. F. (2011, May). Historia Mathematica–How ordinary elimination became Gaussian elimination. Retrieved from ScienceDirect: https://www.sciencedirect.com/science/article/pii/S0315086010000376
Grcar, J. F. (n.d.). Mathematics of Gaussian Elimination. Retrieved from American Mathematical Society: https://www.ams.org/notices/201106/rtx110600782p.pdf

 

 

Engaging students: Solving linear systems of equations by either substitution or graphing

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 Cameron Story. His topic, from Algebra II: solving linear systems of equations by either substitution or graphing.

green line

What interesting word problems using this topic can your students do now?

In algebra I, students are most likely to focus on a system of two equations with two unknown variables. Teachers incorporating two differently priced objects into a word problem works great as a real-world financial problem. However, these tend to be self-similar and are arguably uninspired. More importantly, students working to discover how to solve these systems are more challenged and engaged than those who are just handed the rulebook on systems of equations.

Suppose you place your students in the place of a farmer in ancient history. They have 25 different plots of land in their field, and each plot can either have a corn plant OR a wheat plant. However, suppose the farmer requires 4 times as many corn plants than wheat plants. Task your students to find out how many corn plants and how many wheat plants are in the 25-plot field, using any method they chose.

What is interesting is that there are multiple ways to solve this problem. Students could fill a 5×5 grid with labels C and W for corn and wheat. Then, making sure that they add 4 C’s for every W, they can simply count the squares in the grid to find the answer. Just from the information given to them, they could conclude that  and that . Students could then use substitution to arrive at the answer.

While many other methods arrive at the same solution, graphing these two equations on a W vs C graph reveals the answer to the student visually. After solving each equation for C in terms of W, the intersections of the two lines is the solution. Note that when showing this solution to your students, it is an opportune time to introduce what a system of equations with no solutions (parallel lines) or infinite solutions (two of the same line) look like.

green line

How does this topic extend what your students should have learned in previous courses?

Students are introduced to linear equations with the usual . In this equation, we have the one dependent variable y, whose value depends on the one independent variable x. When you first introduce a system of equations with two unknown variables, whose solution is some coordinate (x, y), the learning curve could be steep the students lack the conceptual understanding to connect linear equations to systems of linear equations.

You can then reveal to your students, or have them discover on their own, that you can take a system of two linear equations, write them in such a way that they represent two separate lines in point-slope form, and then find their intersection. If they intersect, then this is your (x, y) solution. Students should know that there is no coincidence here; just manipulation of something new into something more familiar.

 

 

green line

How can technology (graphing calculator websites or phone apps) be used to effectively engage students with this topic?

Say a student is solving a word problem that results in the following system of linear equations:

x-y=-1

x-4y=-2

            First the student is required to graph this system on an x vs y graph. On a typical handheld graphing calculator, this system cannot simply be punched into the calculator as is. The student might not know this yet, but their calculator could graph it after converting to point-slope form. However, the Geogebra (https://www.geogebra.org/graphing) website and mobile-app can take the equations as shown above as inputs directly without conversion. What I like most about having the students obtain the graph first is that it takes the system and transforms it into a 2-D graph of two intersecting lines. Students should know that each of these lines can be written as  . At this point with some further guidance, the relationship between the system of equations and the lines they represent in 2 dimensions should become apparent to the students through their own independent discovery.

 

References:

“Free Math Apps – Used by over 100 Million Students & Teachers Worldwide.” GeoGebra, http://www.geogebra.org/.

 

Engaging students: Solving linear systems of equations with matrices

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 Danielle Pope. Her topic, from Algebra II: solving linear systems of equations with matrices.

green line

B2. How does this topic extend what your students should have learned in previous courses?

Based off of the TEKS, matrices are introduced in Algebra 2. In previous math courses, students are already going to learn basic arithmetic from elementary school and solving equations in middle and high school. By the time students get to high school, they should have solving single equations down. This concept is then expanded with a system of equations, which is taught with the help of matrices. A matrix is just an “array of numbers” so that’s why this method of solving can be used with linear equations. Once the matrix is set up there are 2 main ways to solve for the solutions. The one I will be discussing is reduced row echelon form. This method of solving systems utilizes the basic arithmetic that students already know. There are 3 row operations that students already know how to use in general not related to matrices. Those are multiplying a row by a constant, switching two rows, and adding a constant times a row to another row. Even though these specific operations are used for matrices, kids have seen how to multiply 2 constants or variables, switching variables, and adding constants or variables in their previous courses. Matrices just add another element to their basic arithmetic abilities.

 

green line

D4. What are the contributions of various cultures to this topic?

Matrices have been around for much longer than some people may realize. One of the earliest civilizations that matrices were traced back to were the Babylonians. This was just one of the many contributions that they contributed to mathematics. The Chinese wrote a book, Nine Chapters of the Mathematical Art, Written during the Han Dynasty in China gave the first known example of matrix methods”. During the same era, around 200 BC, a Chinese mathematician Liu Hui solved linear equations using matrices. In the 1800s, Germany started taking a look at matrices. German mathematician, Carl Jacobi, brought the idea of determinants and matrices into the light. Carl Gauss, another German mathematician, took this idea of determinants and developed it. It wasn’t until Augustin Cauchy, a French mathematician, used and defined the word determinant how was use it today. James Sylvester, an English mathematician, “used the term matrix in 1850”. Sylvester also worked with mathematician Arthur Cayley who “first published an abstract definition of matrix” in his memoir on the Theory of Matrices in 1858. This final definition of a determinant is still used today in classrooms to help solve complex system of equations.

 

green lineE1. How can technology (YouTube, Khan Academy [khanacademy.org], Vi Hart, Geometers Sketchpad, graphing calculators, etc.) be used to effectively engage students with this topic?

In a classroom today, students should be able to access use of a graphing calculator. The matrix feature on these can easily check the work of students just learning how to row-reduce or solve for determinants and inverse matrices. In the classroom, I would use this technology like a race for the right answer to get them engaged in matrices. Give students an easy 2-equation system and have them solve for the variables. Each new problem add an equation or add a variable. While students are solving by hand, the teacher will be using the calculator to see which person can get the answer first. Overtime the problems will be too daunting to do by hand so students will be more engaged to learn this faster shortcut using the calculator. Another resource that can be used out of the classroom is Khan Academies’ videos on solving system of equations with matrices. These videos can be used to fill in any gaps if students have questions at home. These videos can also be used as the lecture in a flipped classroom environment.

References

https://www.mathsisfun.com/algebra/systems-linear-equations-matrices.html
http://www.sparknotes.com/math/algebra2/matrices/section4.rhtml
http://math.nie.edu.sg/bwjyeo/it/MathsOnline_AM/livemath/the/IT3AMMatricesHistory.html

http://math.nie.edu.sg/bwjyeo/it/MathsOnline_AM/livemath/the/IT3AMMatricesHistory.html
http://www.storyofmathematics.com/mathematicians.html

https://www.khanacademy.org/math/precalculus/precalc-matrices/solving-equations-with-inverse-matrices/v/matrix-equations-systems

 

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.

 

 

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

This antiderivative has arguable the highest ratio of “really hard to compute” to “really easy to write”:

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

So far, I’ve shown that the denominator can be factored over the real numbers:

\displaystyle \int \frac{dx}{x^4 + 1} = \displaystyle \int \frac{dx}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)} ,

so that the technique of partial fractions can be applied. Since both quadratics in the denominator are irreducible (and the degree of the numerator is less than the degree of the denominator), the partial fractions decomposition has the form

\displaystyle \frac{1}{\left(x^2 - x \sqrt{2} + 1 \right) \left(x^2 + x \sqrt{2} + 1\right)} = \displaystyle \frac{Ax + B}{\left(x^2 - x \sqrt{2} + 1 \right)} + \displaystyle \frac{Cx + D}{ \left(x^2 + x \sqrt{2} + 1\right)}

Clearing out the denominators, I get

1 = (Ax + B) \left(x^2 + x \sqrt{2} + 1\right) + (Cx + D) \left(x^2 - x \sqrt{2} + 1\right)

or

1 = Ax^3 + Bx^2 + Ax^2 \sqrt{2} + Bx\sqrt{2} + Ax + B + Cx^3 + Dx^2 - Cx^2 \sqrt{2} - Dx\sqrt{2} + Cx + D

or

0x^3 + 0x^2 + 0x + 1 = (A + C)x^3 + (A \sqrt{2} + B - C \sqrt{2} + D)x^2 + (A + B\sqrt{2} + C - D \sqrt{2} ) x + (B+D)

Matching coefficients yields the following system of four equations in four unknowns:

A + C = 0

A\sqrt{2} + B - C\sqrt{2} + D = 0

A + B \sqrt{2} + C - D\sqrt{2} = 0

B + D = 1

Ordinarily, four-by-four systems of linear equations are somewhat painful to solve, but this system isn’t too bad. Since A + C = 0 from the first equation, the third equation becomes

0 + B \sqrt{2} - D \sqrt{2} = 0, or B = D.

From the fourth equation, I can conclude that B = 1/2 and D = 1/2. The second and third equations then become

A\sqrt{2} + \displaystyle \frac{1}{2} - C\sqrt{2} + \frac{1}{2} = 0

A + \displaystyle \frac{\sqrt{2}}{2} + C - \frac{\sqrt{2}}{2} = 0,

or

A - C = \displaystyle -\frac{\sqrt{2}}{2},

A + C = 0.

Adding the two equations yields 2A = -\displaystyle \frac{\sqrt{2}}{4}, so that A = -\displaystyle \frac{\sqrt{2}}{4} and C = \displaystyle \frac{\sqrt{2}}{4}.

Therefore, the integral can be rewritten as

\displaystyle \int \left( \frac{ -\displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 - x \sqrt{2} + 1 } + \frac{ \displaystyle \frac{\sqrt{2}}{4} x + \frac{1}{2}}{ x^2 + x \sqrt{2} + 1 } \right) dx

I’ll start evaluating this integral in tomorrow’s post.

How I Impressed My Wife: Part 5j

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}

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

\displaystyle \int_{-\infty}^{\infty} \left[ \frac{1}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{1}{[u + \sqrt{1-b^2}]^2 +b^2} \right] du

if |b| < 1. (The cases |b| = 1 and |b| > 1 have already been handled earlier in this series.)

To complete the calculation, I employ the now-familiar antiderivative

\displaystyle \int \frac{dx}{x^2 + b^2} = \displaystyle \frac{1}{|b|} \tan^{-1} \left( \frac{x}{b} \right).

Using this antiderivative and a simple substitution, I see that

Q = \displaystyle \left[ \frac{1}{|b|} \tan^{-1} \left( \frac{u - \sqrt{1-b^2}}{b} \right) + \frac{1}{|b|} \tan^{-1} \left( \frac{u - \sqrt{1-b^2}}{b} \right) \right]^{\infty}_{-\infty}

= \displaystyle \frac{1}{|b|} \left[ \left( \frac{\pi}{2} + \frac{\pi}{2} \right) - \left( \frac{-\pi}{2} + \frac{-\pi}{2} \right) \right]

= \displaystyle \frac{2\pi}{|b|}.

This completes the fourth method of evaluating the integral Q, using partial fractions.

green line

There’s at least one more way that the integral Q can be calculated, which I’ll begin with tomorrow’s post.

How I Impressed My Wife: Part 5i

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}

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

if |b| < 1. (The cases |b| = 1 and |b| > 1 have already been handled earlier in this series.)

I will evaluate this integral using partial fractions. The denominator factors as the product of two irreducible quadratics, and so I must solve

\displaystyle \frac{ 2(1+u^2)}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)} = \displaystyle \frac{Au + B}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{Cu + D}{[u + \sqrt{1-b^2}]^2 +b^2},

or

\displaystyle \frac{ 2(1+u^2)}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)} = \displaystyle \frac{Au + B}{u^2 - 2u \sqrt{1-b^2} +1} + \frac{Cu + D}{u^2 + 2u\sqrt{1-b^2} + 1}.

I now clear out the denominators:

2(1+u^2) = (Au+B)(u^2 + 2u\sqrt{1-b^2} + 1) + (Cu+D)(u^2 - 2u\sqrt{1-b^2} + 1)

Now I multiply out the right-hand side:

Au^3 + 2Au^2 \sqrt{1-b^2} + Au + Bu^2 + 2Bu\sqrt{1-b^2} + B

+ Cu^3 - 2Cu^2 \sqrt{1-b^2} + Cu + Du^2 - 2Du\sqrt{1-b^2} + D

Equating this with 2u^2 + 2 and matching coefficients yields the following system of four equations in four unknowns:

A + C = 0

2A\sqrt{1-b^2} + B - 2C \sqrt{1-b^2} + D = 2

Au + 2Bu \sqrt{1-b^2} + Cu - 2Du \sqrt{1-b^2} = 0

B + D = 2

Ordinarily, four-by-four systems of equations are rather painful to solve, but this system isn’t so bad.

From the first equation, I see that C = -A.

From the third equation, I see that

Au + 2Bu \sqrt{1-b^2} + Cu - 2Du \sqrt{1-b^2} = 0

Au + 2Bu \sqrt{1-b^2} -Au - 2Du \sqrt{1-b^2} = 0

2Bu \sqrt{1-b^2} - 2Du \sqrt{1-b^2} = 0

B - D = 0

B = D.

From the fourth equation, I see that

B + D = 2

B + B = 2

2B = 2

B = 1,

so that D =1 as well. Finally, from the second equation, I see that

2A\sqrt{1-b^2} + B - 2C \sqrt{1-b^2} + D = 2

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

4A\sqrt{1-b^2} = 0

A= 0,

so that C = 0 as well. This yields the partial fractions decomposition

\displaystyle \frac{ 2(1+u^2)}{ ([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)} = \displaystyle \frac{1}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{1}{[u + \sqrt{1-b^2}]^2 +b^2}.

This can be confirmed by directly adding the fractions on the right-hand side:

\displaystyle \frac{1}{[u - \sqrt{1-b^2}]^2 +b^2} + \frac{1}{[u + \sqrt{1-b^2}]^2 +b^2}

= \displaystyle \frac{[u + \sqrt{1-b^2}]^2 +b^2 + [u - \sqrt{1-b^2}]^2 +b^2}{([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)}

= \displaystyle \frac{u^2 + 2u\sqrt{1-b^2} + 1 - b^2 + b^2 + u^2 - 2u\sqrt{1-b^2} + 1 - b^2 + b^2}{([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)}

= \displaystyle \frac{2u^2 + 2}{([u - \sqrt{1-b^2}]^2 +b^2)([u + \sqrt{1-b^2}]^2 +b^2)}.

green line

I’ll continue with this fourth evaluation of the integral, continuing the case |b| < 1, in tomorrow’s post.

How I Impressed My Wife: Part 5g

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}

 = \displaystyle \int_{-\infty}^{\infty} \left[ \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_1^2} + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_2^2} \right] du,

where k_1 and k_2 are the positive numbers so that

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

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

so that

u^4 + (4 b^2 - 2) u^2 + 1 = (u^2 + k_1^2) (u^2 + k_2^2)

At this point in the calculation, we can employ the now familiar antiderivative

\displaystyle \int \frac{du}{u^2 +k^2} = \displaystyle \frac{1}{k} \tan^{-1} \left( \frac{u}{k} \right) + C,

so that

Q = \left[ \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{k_1}\tan^{-1} \left( \frac{u}{k_1} \right) + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \displaystyle \frac{1}{k_2} \tan^{-1} \left( \frac{u}{k_2} \right) \right]^{\infty}_{-\infty}

= \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{k_1} \left( \frac{\pi}{2} - \frac{-\pi}{2} \right) + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \displaystyle \frac{1}{k_2} \tan^{-1} \left(\frac{\pi}{2} - \frac{-\pi}{2} \right)

= \displaystyle\frac{\pi}{k_2^2-k_1^2} \left( \frac{2 - 2k_1^2}{k_1} + \frac{2 .k_2^2 - 2}{k_2} \right)

= \displaystyle\frac{\pi}{k_2^2-k_1^2} \left( \frac{(2 - 2k_1^2)k_2 + (2 k_2^2 - 2)k_1 }{k_1 k_2} \right)

= \displaystyle\frac{\pi}{k_2^2-k_1^2} \left( \frac{2 k_2 - 2k_1^2 k_2 + 2 k_1 k_2^2 - 2 k_1 }{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{k_2^2-k_1^2} \left( \frac{k_2 - k_1^2 k_2 + k_1 k_2^2 - k_1 }{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{k_2^2-k_1^2} \left( \frac{k_2 - k_1 - k_1^2 k_2 + k_1 k_2^2 }{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{(k_2-k_1)(k_2+k_1)} \left( \frac{(k_2 - k_1) + k_1 k_2 (k_2 - k_1)}{k_1 k_2} \right)

= \displaystyle\frac{2\pi}{(k_2-k_1)(k_2+k_1)} \left( \frac{(k_2 - k_1)(1+ k_1 k_2)}{k_1 k_2} \right)

= \displaystyle 2\pi \left( \frac{1+ k_1 k_2}{(k_2+k_1) k_1 k_2} \right).

Now it remains to simplify this fraction. To do this, we note that

u^4 + (4 b^2 - 2) u^2 + 1 = (u^2 + k_1^2) (u^2 + k_2^2),

so that

u^4 + (4b^2 - 2)u^2 + 1 = u^4 + (k_1^2 + k_2^2)u^2 + k_1^2 k_2^2

Matching coefficients, we see that

k_1^2 + k_2^2 = 4b^2 -2,

k_1^2 k_2^2 = 1

Since both k_1 and k_2 are positive, we see that k_1 k_2 = 1 from the last equation. Therefore,

k_1^2 + 2 k_1 k_2 + k_2^2 = 4b^2 -2 + 2

(k_1+k_2)^2 = 4b^2

k_1 + k_2 = 2|b|

Plugging these in, we finally conclude that

Q = \displaystyle 2\pi \left( \frac{1+ 1}{2 |b| \cdot 1} \right) = \displaystyle \frac{2\pi}{|b|},

again matching our earlier result.

green line

Using the fourth method, I’ve shown that Q = \displaystyle \frac{2\pi}{|b|} for the cases |b| = 1 and |b| > 1. With tomorrow’s post, I’ll consider the remaining case of |b| < 1.

How I Impressed My Wife: Part 5f

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}

The four roots of the denominator satisfy

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

In yesterday’s post, I handled the case |b| = 1. In today’s post, I’ll consider the case |b| > 1, so that u^2 is a real number for the four roots of the denominator.

For the sake of simplicity, let me define the positive numbers k_1 and k_2 so that

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

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

Clearly 2b^2 + 2|b| \sqrt{b^2-1} - 1 > 0 if |b| > 1, and so we can choose k_1 to be positive. For k_2, notice that

(2b^2 - 1)^2 = 4b^4 - 4b^2 + 1,

while

\left[ 2|b| \sqrt{b^2-1} \right]^2 = 4b^2 (b^2 - 1) = 4b^4 - 4b^2.

Therefore,

(2b^2 - 1)^2 > \left[ 2|b| \sqrt{b^2-1} \right]^2

2b^2 - 1 > 2|b| \sqrt{b^2-1}

2b^2 - 2|b| \sqrt{b^2-1} - 1 > 0

So k_2 can also be chosen to be a positive number.

Using k_1 and k_2, I can write

u^4 + (4 b^2 - 2) u^2 + 1 = (u^2 + k_1^2)(u^2 + k_2^2),

and so the integrand must have the partial fractions decomposition

\displaystyle \frac{ 2(1+u^2)}{u^4 + (4 b^2 - 2) u^2 + 1} = \displaystyle \frac{A}{u^2 + k_1^2} + \displaystyle \frac{B}{u^2 + k_2^2},

Notice that ordinarily, when the denominator contains an irreducible quadratic, the numerator of the partial fractions decomposition has the form Au + B and not A. However, there are no u^3 and u terms in the denominator, I can treat u^2 as the variable for the purposes of the decomposition. Since the right-hand side has linear terms in u^2, it suffices to use a constant for finding the decomposition.

To solve for the constants A and B, I clear out the denominator:

2u^2 + 2 = A \left[ u^2 + k_2^2 \right] + B \left[ u^2 + k_1^2 \right]

Matching coefficients, this yields the system of equations

A + B = 2

A k_2^2 + B k_1^2 = 2

Substituting B = 2-A into the second equation, I get

A k_2^2 + (2-A) k_1^2 = 2

2 k_1^2 + A (k_2^2 - k_1^2) = 2

A (k_2^2 - k_1^2) = 2 - 2k_1^2

A = \displaystyle \frac{2 - 2k_1^2}{k_2^2 - k_1^2}

Therefore,

B = 2 - A = 2 - \displaystyle \frac{2 - 2k_1^2}{k_2^2 - k_1^2}

B = \displaystyle \frac{2(k_2^2 - k_1^2) - (2 - 2k_1^2)}{k_2^2 - k_1^2}

B = \displaystyle \frac{2 k_2^2 - 2}{k_2^2 - k_1^2}

Therefore, the integrand has the partial fractions decomposition

\displaystyle \frac{ 2(1+u^2)}{u^4 + (4 b^2 - 2) u^2 + 1} = \displaystyle \left( \frac{2 - 2k_1^2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_1^2} + \displaystyle \left( \frac{2 k_2^2 - 2}{k_2^2 - k_1^2} \right) \frac{1}{u^2 + k_2^2}

green line

I’ll continue with this fourth evaluation of the integral, continuing the case |b| > 1, in tomorrow’s post.

2048 and algebra: Index

I’m doing something that I should have done a long time ago: collect past series of posts into a single, easy-to-reference post. The following posts formed my series on using algebra to study the 2048 game… with a special focus on reaching the event horizon of 2048 which cannot be surpassed.

2048-0Part 1: Introduction and statement of problem

Part 2: First insight: How points are accumulated in 2048

Part 3: Second insight: The sum of the tiles on the board

Part 4: Algebraic formulation of the two insights

Part 5: Algebraic formulation applied to a more complicated board

Part 6: Algebraic formulation applied to the event horizon of 2048

Part 7: Calculating one of the complicated sums in Part 6 using a finite geometric series

Part 8: Calculating another complicated sum in Part 6 using a finite geometric series

Part 9: Repeating Part 8 by reversing the order of summation in a double sum

Part 10: Estimating the probability of reaching the event horizon in game mode