# My Favorite One-Liners: Part 8

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.

At many layers of the mathematics curriculum, students learn about that various functions can essentially commute with each other. In other words, the order in which the operations is performed doesn’t affect the final answer. Here’s a partial list off the top of my head:

1. Arithmetic/Algebra: $a \cdot (b + c) = a \cdot b + a \cdot c$. This of course is commonly called the distributive property (and not the commutative property), but the essential idea is that the same answer is obtained whether the multiplications are performed first or if the addition is performed first.
2. Algebra: If $a,b > 0$, then $\sqrt{ab} = \sqrt{a} \sqrt{b}$.
3. Algebra: If $a,b > 0$ and $x$ is any real number, then $(ab)^x = a^x b^x$.
4. Precalculus: $\displaystyle \sum_{i=1}^n (a_i+b_i) = \displaystyle \sum_{i=1}^n a_i + \sum_{i=1}^n b_i$.
5. Precalculus: $\displaystyle \sum_{i=1}^n c a_i = c \displaystyle \sum_{i=1}^n a_i$.
6. Calculus: If $f$ is continuous at an interior point $c$, then $\displaystyle \lim_{x \to c} f(x) = f(c)$.
7. Calculus: If $f$ and $g$ are differentiable, then $(f+g)' = f' + g'$.
8. Calculus: If $f$ is differentiable and $c$ is a constant, then $(cf)' = cf'$.
9. Calculus: If $f$ and $g$ are integrable, then $\int (f+g) = \int f + \int g$.
10. Calculus: If $f$ is integrable and $c$ is a constant, then $\int cf = c \int f$.
11. Calculus: If $f: \mathbb{R}^2 \to \mathbb{R}$ is integrable, $\iint f(x,y) dx dy = \iint f(x,y) dy dx$.
12. Calculus: For most differentiable function $f: \mathbb{R}^2 \to \mathbb{R}$ that arise in practice, $\displaystyle \frac{\partial^2 f}{\partial x \partial y} = \displaystyle \frac{\partial^2 f}{\partial y \partial x}$.
13. Probability: If $X$ and $Y$ are random variables, then $E(X+Y) = E(X) + E(Y)$.
14. Probability: If $X$ is a random variable and $c$ is a constant, then $E(cX) = c E(X)$.
15. Probability: If $X$ and $Y$ are independent random variables, then $E(XY) = E(X) E(Y)$.
16. Probability: If $X$ and $Y$ are independent random variables, then $\hbox{Var}(X+Y) = \hbox{Var}(X) + \hbox{Var}(Y)$.
17. Set theory: If $A$, $B$, and $C$ are sets, then $A \cup (B \cap C) = (A \cup B) \cap (A \cup C)$.
18. Set theory: If $A$, $B$, and $C$ are sets, then $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$.

However, there are plenty of instances when two functions do not commute. Most of these, of course, are common mistakes that students make when they first encounter these concepts. Here’s a partial list off the top of my head. (For all of these, the inequality sign means that the two sides do not have to be equal… though there may be special cases when equality happens to happen.)

1. Algebra: $(a+b)^x \ne a^x + b^x$ if $x \ne 1$. Important special cases are $x = 2$, $x = 1/2$, and $x = -1$.
2. Algebra/Precalculus: $\log_b(x+y) = \log_b x + \log_b y$. I call this the third classic blunder.
3. Precalculus: $(f \circ g)(x) \ne (g \circ f)(x)$.
4. Precalculus: $\sin(x+y) \ne \sin x + \sin y$, $\cos(x+y) \ne \cos x + \cos y$, etc.
5. Precalculus: $\displaystyle \sum_{i=1}^n (a_i b_i) \ne \displaystyle \left(\sum_{i=1}^n a_i \right) \left( \sum_{i=1}^n b_i \right)$.
6. Calculus: $(fg)' \ne f' \cdot g'$.
7. Calculus $\left( \displaystyle \frac{f}{g} \right)' \ne \displaystyle \frac{f'}{g'}$
8. Calculus: $\int fg \ne \left( \int f \right) \left( \int g \right)$.
9. Probability: If $X$ and $Y$ are dependent random variables, then $E(XY) \ne E(X) E(Y)$.
10. Probability: If $X$ and $Y$ are dependent random variables, then $\hbox{Var}(X+Y) \ne \hbox{Var}(X) + \hbox{Var}(Y)$.

All this to say, it’s a big deal when two functions commute, because this doesn’t happen all the time.

I wish I could remember the speaker’s name, but I heard the following one-liner at a state mathematics conference many years ago, and I’ve used it to great effect in my classes ever since. Whenever I present a property where two functions commute, I’ll say, “In other words, the order of operations does not matter. This is a big deal, because, in real life, the order of operations usually is important. For example, this morning, you probably got dressed and then went outside. The order was important.”

# A Natural Function with Discontinuities: Index

I’m doing something that I should have done a long time ago: collecting a series of posts into one single post. The following links comprised my series on a natural function that nevertheless has discontinuities.

Part 1: Introduction

Part 2: Derivation of this piecewise function, beginning.

Part 3: Derivation of the piecewise function, ending.

# Math Maps The Island of Utopia

Under the category of “Somebody Had To Figure It Out,” Dr. Andrew Simoson of King University (Bristol, Tennessee) used calculus to determine the shape of the island of Utopia in the 500-year-old book by Sir Thomas More based on the description of island given in the book’s introduction.

Paper by Dr. Simoson: http://archive.bridgesmathart.org/2016/bridges2016-65.html

# A natural function with discontinuities (Part 1)

The following tidbit that was published on the American Mathematical Monthly’s Facebook page caught my attention:

Here’s the relationship between $r$, $R$, and $\theta$ in case it isn’t clear from the description. The gray sector is determined by $r$ and $\theta$, and then the blue circle with radius $r$ is chosen to enclose the sector.

Unfortunately, there was typo for the third case; it should have been $r = R \sin \frac{1}{2} \theta$ if $90^\circ \le \theta \le 180^\circ$. Here’s the graph if $R = 1$, using radians instead of degrees:

As indicated in the article, there’s a discontinuity at $t=0$. However, the rest of the graph looks nice and smooth.

Here’s the graph of the first derivative:

The first derivative is continuous (and so the original graph is smooth). However, there are obvious corners in the graph of the first derivative, which betray discontinuities in the graph of the second derivative:

# An Alternative Proof of the Product Rule

I saw this and immediately groaned, wondering why I hadn’t thought of this myself.

# Stump the Prof: An Activity for Calculus I

After finishing the Product, Quotient, and Chain Rules in my calculus class, I’d tell my class the following: “Next time, we’re going to play Stump the Prof. Anything that you can write on the board in 15 seconds, I will differentiate. Anything. I don’t care how hard it looks, I’ll differentiate it (if it has a derivative). So do your best to stump me.”

At the next lecture, I would devote the last 15-20 minutes of class time to Stump the Prof. Students absolutely loved it… their competitive juices got flowing as they tried to think of the nastiest, hairiest functions that they could write on the board in 15 seconds. And I’d differentiate them all using the rules we’d just covered.. though I never promised that I would simplify the derivatives!

Sometimes the results were quite funny. Every once in a while, a student would write some amazingly awful expression but forgot to include an $x$ anywhere. Since the given function was a constant, the derivative of course was zero.

The worst one I ever got was something like this:

$y = \csc^4(\sec^5(\csc^8(\sec^7(\csc^4(\sec^5(x)))))$

Differentiating this took a good 3-4 minutes and took maybe 5 lines across the entire length of the chalkboard; I remember that my arm was sore after writing down the derivative. Naturally, some wise guy used his 15 seconds to write $y =$ in front of my answer, asking me to find the second derivative. At that, I waved my white handkerchief and  surrendered.

The point of this exercise is to illustrate to students that differentiation is a science; there are rules to follow, and by carefully following the rules, one can find the derivative of any “standard” function.

Later on, when we hit integration, I’ll draw a contrast: differentiation is a science, but integration is a combination of both science and art.

# Different Ways of Computing a Limit: Index

I’m doing something that I should have done a long time ago: collecting a series of posts into one single post. The following links comprised my series on different ways of computing the limit

$\displaystyle \lim_{x \to \infty} \frac{\sqrt{x^2+1}}{x}$

Part 1: Algebra

Part 2: L’Hopital’s Rule

Part 3: Trigonometric substitution

Part 4: Geometry

Part 5: Geometry again

# 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.

Since $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|}$.

And 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.

Since $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]$.

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