# College Math Teaching

## October 3, 2016

### Lagrange Polynomials and Linear Algebra

Filed under: algebra, linear albegra — Tags: — collegemathteaching @ 9:24 pm

We are discussing abstract vector spaces in linear algebra class. So, I decided to do an application.

Let $P_n$ denote the polynomials of degree $n$ or less; the coefficients will be real numbers. Clearly $P_n$ is $n+1$ dimensional and $\{1, x, x^2, ...x^n \}$ constitutes a basis.

Now there are many reasons why we might want to find a degree $n$ polynomial that takes on certain values for certain values of $x$. So, choose $x_0, x_1, x_2, ..., x_{n-1}$. So, let’s construct an alternate basis as follows: $L_0 = \frac{(x-x_1)(x-x_2)(x-x_3)..(x-x_{n})}{(x_0 - x_1)(x_0-x-x_2)..(x_0 - x_{n})}, L_1 = \frac{(x-x_0)(x-x_2)(x-x_3)..(x-x_{n})}{(x_1 - x_0)(x_1-x-x_2)..(x_1 - x_{n})}, ...L_k = \frac{(x-x_0)(x-x_1)(x-x_2)..(x-x_{k-1})(x-x_{k+1})...(x-x_{n})}{(x_k - x_1)(x_k-x-x_2)..(x_k - x_{k-1})(x_k - x_{k+1})...(x_k - x_{n})}.$ $....L_{n} = \frac{(x-x_0)(x-x_1)(x-x_2)..(x-x_{n-1})}{(x_{n}- x_1)(x_{n}-x-x_2)..(x_{n} - x_{n})}$

This is a blizzard of subscripts but the idea is pretty simple. Note that $L_k(x_k) = 1$ and $L_k(x_j) = 0$ if $j \neq k$.

But let’s look at a simple example: suppose we want to form a new basis for $P_2$ and we are interested in fixing $x$ values of $-1, 0, 1$.

So $L_0 = \frac{(x)(x-1)}{(-1-0)(-1-1)} = \frac{(x)(x-1)}{2}, L_1 = \frac{(x+1)(x-1)}{(0+1)(0-1)} = -(x+1)(x-1),$
$L_2 = \frac{(x+1)x}{(1+1)(1-0)} = \frac{(x+1)(x)}{2}$. Then we note that

$L_0(-1) = 1, L_0(0) =0, L_0(1) =0, L_1(-1)=0, L_1(0) = 1, L_1(1) = 0, L_2(-1)=0, L_2(0) =0, L_2(1)=1$

Now, we claim that the $L_k$ are linearly independent. This is why:

Suppose $a_0 L_0 + a_1 L_1 + ....a_n L_n =0$ as a vector. We can now solve for the $a_i$ Substitute $x_i$ into the right hand side of the equation to get $a_iL_i(x_i) = 0$ (note: $L_k(x_i) = 0$ for $i \neq k$). So $L_0, L_1, ...L_n$ are $n+1$ linearly independent vectors in $P_n$ and therefore constitute a basis.

Example: suppose we want to have a degree two polynomial $p(x)$ where $p(-1) =5, p(0) =3, p(1) = 17.$. We use our new basis to obtain:

$p(x) = 5L_0(x) + 3 L_1(x) + 17L_2(x) = \frac{5}{2}(x)(x-1) -3(x+1)(x-1) + \frac{17}{2}x(x+1)$. It is easy to check that $p(-1) = 5, p(0) =3, p(1) = 17$

## September 23, 2016

### Carmichael Numbers: “not quite” primes…

Filed under: algebra, elementary number theory, number theory, recreational mathematics — collegemathteaching @ 9:49 pm

We had a fun mathematics seminar yesterday.

Andrew Shallue gave a talk about the Carmichael numbers and gave a glimpse into his research. Along the way he mentioned the work of another mathematician…one that I met during my ultramarathon/marathon walking adventures! Talk about a small world..

So, to kick start my brain cells, I’ll say a few words about these.

First of all, prime numbers are very important in encryption schemes and it is a great benefit to be able to find them. However, for very large numbers, it can be difficult to determine whether a number is prime or not.

So one can take short cuts in determining whether a number is *likely* prime or not: one can say “ok, prime numbers have property P and if this number doesn’t have property P, it is not a prime. But if it DOES have property P, we hare X percent sure that it really is a prime.

If this said property is relatively “easy” to implement (via a computer), we might be able to live with the small amount of errors that our test generates.

One such test is to see if this given number satisfies “Fermat’s Little Theorem” which is as follows:

Let $a$ be a positive integer and $p$ be a prime, and suppose $a \neq kp$, that is $a \neq 0 (mod p)$ Then $a^{p-1} = 1 (mod p)$

If you forgotten how this works, recall that $Z_p$ is a field if $p$ is a prime, so $a \in Z_p, a \neq 0 (mod p)$ means that the set $\{a, 2a, 3a, ...(p-1)a \}$ consists of $\{1, 2, 3, ...(p-1) \}$. So take the product $(a)(2a)(3a)...((p-1)a)) = 1(2)(3)..(p-1)a^{p-1} = 1(2)(3)...(p-1) (mod p)$. Now note that we are working in a field, so we can cancel the $(1)(2)...(p-1)$ factor on both sides to get $a^{p-1} = 1 (mod p)$.

So one way to check to see if a number $q$ might be a prime is to check all $a^{q-1}$ for all $a \leq q$ and see if $a^{q-1} = 1 mod q$.
Now this is NOT a perfect check; there are non-prime numbers for which $a^{q-1} = 1 mod q$ for all $a \leq q$; these are called the Carmichael numbers. The 3 smallest such numbers are 561, 41041 and 825265.

The talk was about much more than this, but this was interesting.

## August 19, 2016

### A fun question concerning projections

Filed under: geometry, popular mathematics — Tags: — collegemathteaching @ 11:34 am

The semester is about to start. I decided to have some fun on Facebook. I took some office shots (yes, my office is messy) and decided to retouch the photos by adding joke photos from Facebook; I wanted to see which friends noticed (without being specifically notified). One did.

Of course, the color alone will give away which “on the wall” photos are genuine and which were put in (via Paint).

But a fun question is: if those photos were to be genuine, what size and shape would they be in real life (to appear the way that they do in those shots). One would give the genuine dimensions of the genuine photos on the wall to help the student solve the problem.

A more sophisticated 3-d version of the problem can be obtained from this cool video:

## August 11, 2016

### Post Promotion Summer

Filed under: editorial, topology — Tags: — collegemathteaching @ 12:02 am

This is my first “terminal promotion” summer. And while I have something that I have “sort of” written up…I just don’t like the result; it basically fills in some gaps in a survey article. But I think that my thinking about this article has lead me to something that I can add to the paper so that I’ll actually LIKE what I submit.

Then again, my quandary can be summed up in this tweet:

If I wait until I am absolutely in love with my work before I send it out, it will never get sent out.

Hopefully, I’ll have more material to add to this blog this semester.

What I am working on: equivalence classes of simple closed curves; these are one to one, continuous images of the unit circle in 3-space. The objects that I am studying are so pathological that these curves fail to have a tangent at ANY point. One of these beasts can be constructed by taking the intersection of these nested, solid tori.

## June 15, 2016

### Elementary Math in the news: elections

Filed under: calculus, elementary mathematics, news — Tags: — collegemathteaching @ 9:11 pm

Ok, mostly I am trying to avoid writing up the painful details of a proposed mathematics paper.
But I do follow elections relatively closely. In the California Democratic primary, CNN called the election for Hillary Clinton late on June 7; at the time she lead Bernie Sanders 1,940,588-1,502,043, which is a margin of 438,537 votes. Percentage wise, the lead was 55.8-43.2, or 12.6 percentage points.

But due to mail in balloting and provisional ballot counting, there were still many votes to count. As of this morning, the totals were:

2,360,266-1,887,178 for a numerical lead of 473,088 votes. Percentage wise, the lead was 55.1-44.0, or 11.1 percentage points.

So, the lead grew numerically, but shrunk percentage wise.

“Big deal”, you say? Well, from reading social media, it is not obvious (to some) how a lead can grow numerically but shrink as a percentage.

Conceptually, it is pretty easy to explain: suppose one has an election involving 1100 voters who MUST choose between candidates. Say the first 100 votes that are counted happened to come from a strongly pro-Hillary group, and the tally after 100 was 90 Hillary, 10 Bernie. Then suppose the next 1000 was closer, say 550 for Hillary and 450 for Bernie. Then the lead grew by 100 votes (80 to 180) but the percentage lead shrunk from 80 percentage points to a 16.36 percentage point lead (58.18 to 41.82 percent). And it is easy to see that if the rest of the vote was really 55 percent Hillary, her percent of the vote would asymptotically shrink to close to 55 percent as the number of votes counted went up.

So, how might one have students model it? Let $H(t), B(t)$ be increasing functions of $t$ which represent the number of votes for Hillary and Bernie as a function of time. Assume no mistakes, hence $H(t), B(t)$ can be assumed to be increasing functions. So we want a case there $D(t) = H(t)-B(t)$ is an increasing function but $P(t) = \frac{H(t)}{H(t)+ B(t)}$ decreases with time.

Without calculus: rewrite $P(t) = \frac{1}{1+\frac{B(t)}{H(t)}}$ and note that $P(t)$ decreases as $\frac{B(t)}{H(t)}$ increases; that is, as $B(t)$ outgrows $H(t)$. But $H(t)$ must continue to outgrow $B(t)$. That is, the new ballots must still include more Hillary Bernie ballots, but the ratio of Bernie ballots to Hillary ballots must be going down.

If we use some calculus, we see that $H'(t)$ must exceed $B'(t)$ but to make $P(t)$ decrease, use the quotient rule plus a tiny bit of algebra to conclude that $H'(t)B(t)-B'(t)H(t)$ must be negative, or that $\frac{B'(t)}{B(t)} > \frac{H'(t)}{H(t)}$. That is, the Bernie ballots must be growing at a higher percentage rate than the Hillary ballots are.

None of this is surprising, but it might let the students get a feel of what derivatives are and what proportional change means.

## June 7, 2016

### Pop-math: getting it wrong but being close enough to give the public a feel for it

Space filling curves: for now, we’ll just work on continuous functions $f: [0,1] \rightarrow [0,1] \times [0,1] \subset R^2$.

A curve is typically defined as a continuous function $f: [0,1] \rightarrow M$ where $M$ is, say, a manifold (a 2’nd countable metric space which has neighborhoods either locally homeomorphic to $R^k$ or $R^{k-1})$. Note: though we often think of smooth or piecewise linear curves, we don’t have to do so. Also, we can allow for self-intersections.

However, if we don’t put restrictions such as these, weird things can happen. It can be shown (and the video suggests a construction, which is correct) that there exists a continuous, ONTO function $f: [0,1] \rightarrow [0,1] \times [0,1]$; such a gadget is called a space filling curve.

It follows from elementary topology that such an $f$ cannot be one to one, because if it were, because the domain is compact, $f$ would have to be a homeomorphism. But the respective spaces are not homeomorphic. For example: the closed interval is disconnected by the removal of any non-end point, whereas the closed square has no such separating point.

Therefore, if $f$ is a space filling curve, the inverse image of a points is actually an infinite number of points; the inverse (as a function) cannot be defined.

And THAT is where this article and video goes off of the rails, though, practically speaking, one can approximate the space filling curve as close as one pleases by an embedded curve (one that IS one to one) and therefore snake the curve through any desired number of points (pixels?).

So, enjoy the video which I got from here (and yes, the text of this post has the aforementioned error)

### Infinite dimensional vector subspaces: an accessible example that W-perp-perp isn’t always W

Filed under: integrals, linear albegra — Tags: , — collegemathteaching @ 9:02 pm

This is based on a Mathematics Magazine article by Irving Katz: An Inequality of Orthogonal Complements found in Mathematics Magazine, Vol. 65, No. 4, October 1992 (258-259).

In finite dimensional inner product spaces, we often prove that $(W^{\perp})^{\perp} = W$ My favorite way to do this: I introduce Grahm-Schmidt early and find an orthogonal basis for $W$ and then extend it to an orthogonal basis for the whole space; the basis elements that are not basis elements are automatically the basis for $W^{\perp}$. Then one easily deduces that $(W^{\perp})^{\perp} = W$ (and that any vector can easily be broken into a projection onto $W, W^{\perp}$, etc.

But this sort of construction runs into difficulty when the space is infinite dimensional; one points out that the vector addition operation is defined only for the addition of a finite number of vectors. No, we don’t deal with Hilbert spaces in our first course. 🙂

So what is our example? I won’t belabor the details as they can make good exercises whose solution can be found in the paper I cited.

So here goes: let $V$ be the vector space of all polynomials. Let $W_0$ the subspace of even polynomials (all terms have even degree), $W_1$ the subspace of odd polynomials, and note that $V = W_0 \oplus W_1$

Let the inner product be $\langle p(x), q(x) \rangle = \int^1_{-1}p(x)q(x) dx$. Now it isn’t hard to see that $(W_0)^{\perp} = W_1$ and $(W_1)^{\perp} = W_0$.

Now let $U$ denote the subspace of polynomials whose terms all have degree that are multiples of 4 (e. g. $1 + 3x^4 - 2x^8$ and note that $U^{\perp} \subset W_1$.

To see the reverse inclusion, note that if $p(x) \in U^{\perp}$, $p(x) = p_0 + p_1$ where $p_0 \in W_0, p_1 \in W_1$ and then $\int^1_{-1} (p_1(x))x^{4k} dx = 0$ for any $k \in \{1, 2, ... \}$. So we see that it must be the case that $\int^1_{-1} (p_0(x))x^{4k} dx = 0 = 2\int^1_0 (p_0(x))x^{4k} dx$ as well.

Now we can write: $p_0(x) = c_0 + c_1 x^2 + ...c_n x^{2n}$ and therefore $\int^1_0 p_0(x) x^{4k} dx = c_0\frac{1}{4k+1} + c_1 \frac{1}{2 + 4k+1}...+c_n \frac{1}{2n + 4k+1} = 0$ for $k \in \{0, 1, 2, ...2n+1 \}$

Now I wish I had a more general proof of this. But these equations (for each $k$ leads a system of equations:

$\left( \begin{array}{cccc} 1 & \frac{1}{3} & \frac{1}{5} & ...\frac{1}{2n+1} \\ \frac{1}{5} & \frac{1}{7} & \frac{1}{9}...&\frac{1}{2n+5} \\ ... & ... & ... & ... \\ \frac{1}{4k+1} & \frac{1}{4k+3} & ...& \frac{1}{10n+4} \end{array} \right) \left( \begin{array}{c} c_0 \\ c_1 \\ ... \\ c_n \end{array} \right) = \left( \begin{array}{c} 0 \\ 0 \\ ... \\ 0 \end{array} \right)$

It turns out that the given square matrix is non-singular (see page 92, no. 3 of Polya and Szego: Problems and Theorems in Analysis, Vol. 2, 1976) and so the $c_j = 0$. This means $p_0 = 0$ and so $U^{\perp} = W_1$

Anyway, the conclusion leaves me cold a bit. It seems as if I should be able to prove: let $f$ be some, say…$C^{\infty}$ function over $[0,1]$ where $\int^1_0 x^{2k} f(x) dx = 0$ for all $k \in \{0, 1, ....\}$ then $f = 0$. I haven’t found a proof as yet…perhaps it is false?

## May 20, 2016

### Student integral tricks…

Ok, classes ended last week and my brain is way out of math shape. Right now I am contemplating how to show that the complements of this object

and of the complement of the object depicted in figure 3, are NOT homeomorphic.

I can do this in this very specific case; I am interested in seeing what happens if the “tangle pattern” is changed. Are the complements of these two related objects *always* topologically different? I am reasonably sure yes, but my brain is rebelling at doing the hard work to nail it down.

Anyhow, finals are graded and I am usually treated to one unusual student trick. Here is one for the semester:

$\int x^2 \sqrt{x+1} dx =$

Now I was hoping that they would say $u = x +1 \rightarrow u-1 = x \rightarrow x^2 = u^2-2u+1$ at which case the integral is translated to: $\int u^{\frac{5}{2}} - 2u^{\frac{3}{2}} + u^{\frac{1}{2}} du$ which is easy to do.

Now those wanting to do it a more difficult (but still sort of standard) way could do two repetitions of integration by parts with the first set up being $x^2 = u, \sqrt{x+1}dx =dv \rightarrow du = 2xdx, v = \frac{2}{3} (x+1)^{\frac{3}{2}}$ and that works just fine.

But I did see this: $x =tan^2(u), dx = 2tan(u)sec^2(u)du, x+1 = tan^2(x)+1 = sec^2(u)$ (ok, there are some domain issues here but never mind that) and we end up with the transformed integral: $2\int tan^5(u)sec^3(u) du$ which can be transformed to $2\int (sec^6(u) - 2 sec^4(u) + sec^2(u)) tan(u)sec(u) du$ by elementary trig identities.

And yes, that leads to an answer of $\frac{2}{7}sec^7(u) +\frac{4}{5}sec^5(u) + \frac{2}{3}sec^3(u) + C$ which, upon using the triangle

Gives you an answer that is exactly in the same form as the desired “rationalization substitution” answer. Yeah, I gave full credit despite the “domain issues” (in the original integral, it is possible for $x \in (-1,0]$ ).

What can I say?

## April 12, 2016

### At long last…

Filed under: academia, editorial — Tags: — collegemathteaching @ 9:17 pm

I’ve been silent on this blog for too long. Part of what is happening: our department is slowly morphing into a “mostly service courses” department due to new regulations on “minimum class size” (set to 10 students for upper division courses). THAT, plus a dearth of “mathematics teaching majors” is hurting our “majors” enrollment.

So it has been “all calculus/all the time” for me lately. Yes, calculus can be fun to teach but after close to 30 years…..zzzzzz….

And it would be unethical for me to try something new just because I am bored.

But I finally have something I want to talk about: next post!

## February 10, 2016

### Vector subspaces: two examples

Filed under: linear albegra, pedagogy — Tags: — collegemathteaching @ 8:41 pm

I am teaching linear algebra our of the book by Fraleigh and Beauregard. We are on “subspaces” (subsets of $R^n$ for now) and a subspace is defined to be a set of vectors that is closed under both vector addition and scalar multiplication. Here are a couple of examples of non-subspaces:

1. $W= \{(x,y)| xy = 0 \}$. Now this space IS closed under scalar multiplication, note that this space IS closed under additive inverses. But it is not closed under addition as $[x,0] + [0,y]=[x,y] \notin W$ for $x \neq 0, y \neq 0$.

2. (this example is in the book): the vectors $\{(n, m) | n, m \in Z \}$ are closed under vector addition but not under scalar multiplication.