College Math Teaching

July 12, 2020

Logarithmic differentiation: do we not care about domains anymore?

Filed under: calculus, derivatives, elementary mathematics, pedagogy — collegemathteaching @ 11:29 pm

The introduction is for a student who might not have seen logarithmic differentiation before: (and yes, this technique is extensively used..for example it is used in the “maximum likelihood function” calculation frequently encountered in statistics)

Suppose you are given, say, f(x) =sin(x)e^x(x-2)^3(x+1) and you are told to calculate the derivative?

Calculus texts often offer the technique of logarithmic differentiation: write ln(f(x)) = ln(sin(x)e^x(x-2)^3(x+1)) = ln(sin(x)) + x + 3ln(x-2) + ln(x+1)
Now differentiate both sides: ln((f(x))' = \frac{f'(x)}{f(x)}  = \frac{cos(x)}{sin(x)} + 1 + \frac{3}{x-2} + {1 \over x+1}

Now multiply both sides by f(x) to obtain

f'(x) = f(x)(\frac{cos(x)}{sin(x)} + 1 + \frac{3}{x-2} + {1 \over x+1}) =


(sin(x)e^x(x-2)^3(x+1)(\frac{cos(x)}{sin(x)} + 1 + \frac{3}{x-2} + {1 \over x+1})

And this is correct…sort of. Why I say sort of: what happens, at say, x = 0 ? The derivative certainly exists there but what about that second factor? Yes, the sin(x) gets cancelled out by the first factor, but AS WRITTEN, there is an oh-so-subtle problem with domains.

You can only substitute x \in \{ 0, \pm k \pi \} only after simplifying ..which one might see as a limit process.

But let’s stop and take a closer look at the whole process: we started with f(x) = g_1(x) g_2(x) ...g_n(x) and then took the log of both sides. Where is the log defined? And when does ln(ab) = ln(a) + ln(b) ? You got it: this only works when a > 0, b > 0 .

So, on the face of it, ln(g_1 (x) g_2(x) ...g_n(x)) = ln(g_1(x) ) + ln(g_2(x) ) + ...ln(g_n(x)) is justified only when each g_i(x) > 0 .

Why can we get away with ignoring all of this, at least in this case?

Well, here is why:

1. If f(x) \neq 0 is a differentiable function then \frac{d}{dx} ln(|f(x)|) = \frac{f'(x)}{f(x)}
Yes, this is covered in the derivation of \int {dx \over x} material but here goes: write

|f(x)| =   \begin{cases}      f(x) ,& \text{if } f(x) > 0 \\      -f(x),              & \text{otherwise}  \end{cases}

Now if f(x) > 0 we get { d \over dx} ln(f(x)) = {f'(x) \over f(x) } as usual. If f(x) < 0 then |f(x)| = =f(x), |f(x)|' = (-f(x))' = -f'(x) and so in either case:

\frac{d}{dx} ln(|f(x)|) = \frac{f'(x)}{f(x)} as required.

THAT is the workaround for calculating {d \over dx } ln(g_1(x)g_2(x)..g_n(x)) where g_1(x)g_2(x)..g_n(x) \neq 0 : just calculate {d \over dx } ln(|g_1(x)g_2(x)..g_n(x)|) . noting that |g_1(x)g_2(x)..g_n(x)| = |g_1(x)| |g_2(x)|...|g_n(x)|

Yay! We are almost done! But, what about the cases where at least some of the factors are zero at, say x= x_0 ?

Here, we have to bite the bullet and admit that we cannot take the log of the product where any of the factors have a zero, at that point. But this is what we can prove:

Given g_1(x) g_2(x)...g_n(x) is a product of differentiable functions and g_1(a) g_2(a)...g_k(a) = 0 k \leq n then
(g_1(a)g_2(a)...g_n(a))' = lim_{x \rightarrow a}  g_1(x)g_2(x)..g_n(x) ({g_1'(x) \over g_1(x)} + {g_2'(x) \over g_2(x)} + ...{g_n'(x) \over g_n(x})

This works out to what we want by cancellation of factors.

Here is one way to proceed with the proof:

1. Suppose f, g are differentiable and f(a) = g(a) = 0 . Then (fg)'(a) = f'(a)g(a) + f(a)g'(a) = 0 and lim_{x \rightarrow a} f(x)g(x)({f'(x) \over f(x)} + {g'(x) \over g(x)}) = 0
2. Now suppose f, g are differentiable and f(a) =0 ,  g(a) \neq 0 . Then (fg)'(a) = f'(a)g(a) + f(a)g'(a) = f'(a)g(a) and lim_{x \rightarrow a} f(x)g(x)({f'(x) \over f(x)} + {g'(x) \over g(x)}) = f'(a)g(a)
3.Now apply the above to g_1(x) g_2(x)...g_n(x) is a product of differentiable functions and g_1(a) g_2(a)...g_k(a) = 0 k \leq n
If k = n then (g_1(a)g_2(a)...g_n(a))' = lim_{x \rightarrow a}  g_1(x)g_2(x)..g_n(x) ({g_1'(x) \over g_1(x)} + {g_2'(x) \over g_2(x)} + ...{g_n'(x) \over g_n(x}) =0 by inductive application of 1.

If k < n then let g_1...g_k = f, g_{k+1} ..g_n  =g as in 2. Then by 2, we have (fg)' =  f'(a)g(a) Now this quantity is zero unless k = 1 and f'(a) neq 0 . But in this case note that lim_{x \rightarrow a} g_1(x)g_2(x)...g_n(x)({g_1'(x) \over g_1(x)} + {g_2'(x) \over g_2(x)} + ...+ {g_n'(x) \over g_n(x)})  = lim_{x \rightarrow a} g_2(x)...g_n(x)(g_1'(x)) =g(a)g_1(a)

So there it is. Yes, it works ..with appropriate precautions.

July 10, 2020

This always bothered me about partial fractions…

Filed under: algebra, calculus, complex variables, elementary mathematics, integration by substitution — Tags: — collegemathteaching @ 12:03 am

Let’s look at an “easy” starting example: write \frac{1}{(x-1)(x+1)} = \frac{A}{x-1} + \frac{B}{x+1}
We know how that goes: multiply both sides by (x-1)(x+1) to get 1 = A(x+1) + B(x-1) and then since this must be true for ALL x , substitute x=-1 to get B = -{1 \over 2} and then substitute x = 1 to get A = {1 \over 2} . Easy-peasy.

BUT…why CAN you do such a substitution since the original domain excludes x =1, x = -1 ?? (and no, I don’t want to hear about residues and “poles of order 1”; this is calculus 2. )

Lets start with \frac{1}{(x-1)(x+1)} = \frac{A}{x-1} + \frac{B}{x+1} with the restricted domain, say x \neq 1
Now multiply both sides by x-1 and note that, with the restricted domain x \neq 1 we have:

\frac{1}{x+1}  = A + \frac{B(x-1)}{x+1} But both sides are equal on the domain (-1, 1) \cup (1, \infty) and the limit on the left hand side is lim_{x \rightarrow 1} {1 \over x+1 } = {1 \over 2} So the right hand side has a limit which exists and is equal to A . So the result follows..and this works for the calculation for B as well.

Yes, no engineer will care about this. But THIS is the reason we can substitute the non-domain points.

As an aside: if you are trying to solve something like {x^2 + 3x + 2 \over (x^2+1)(x-3) } = {Ax + B \over x^2+1 } + {C \over x-3 } one can do the denominator clearing, and, as appropriate substitute x = i and compare real and imaginary parts ..and yes, now you can use poles and residues.

February 14, 2019

Elementary Algebra Exercises

Filed under: elementary mathematics, popular mathematics — collegemathteaching @ 8:06 pm

I saw this meme floating around:


1. Assuming that a, b are real numbers, find all a, b for which each relation is true, OR show why it is impossible.

2. Where appropriate, repeat exercise 1 but for, say, a field or ring.

December 21, 2018

Over-scheduling of senior faculty and lower division courses: how important is course prep?

It seems as if the time faculty is expected to spend on administrative tasks is growing exponentially. In our case: we’ve had some administrative upheaval with the new people coming in to “clean things up”, thereby launching new task forces, creating more committees, etc. And this is a time suck; often more senior faculty more or less go through the motions when it comes to course preparation for the elementary courses (say: the calculus sequence, or elementary differential equations).

And so:

1. Does this harm the course quality and if so..
2. Is there any effect on the students?

I should first explain why I am thinking about this; I’ll give some specific examples from my department.

1. Some time ago, a faculty member gave a seminar in which he gave an “elementary” proof of why \int e^{x^2} dx is non-elementary. Ok, this proof took 40-50 minutes to get through. But at the end, the professor giving the seminar exclaimed: “isn’t this lovely?” at which, another senior member (one who didn’t have a Ph. D. had had been around since the 1960’s) asked “why are you happy that yet again, we haven’t had success?” The fact that a proof that \int e^{x^2} dx could not be expressed in terms of the usual functions by the standard field operations had been given; the whole point had eluded him. And remember, this person was in our calculus teaching line up.

2. Another time, in a less formal setting, I had mentioned that I had given a brief mention to my class that one could compute and improper integral (over the real line) of an unbounded function that that a function could have a Laplace transform. A junior faculty member who had just taught differential equations tried to inform me that only functions of exponential order could have a Laplace transform; I replied that, while many texts restricted Laplace transforms to such functions, that was not mathematically necessary (though it is a reasonable restriction for an applied first course). (briefly: imagine a function whose graph consisted of a spike of height e^{n^2} at integer points over an interval of width \frac{1}{2^{2n} e^{2n^2}} and was zero elsewhere.

3. In still another case, I was talking about errors in answer keys and how, when I taught courses that I wasn’t qualified to teach (e. g. actuarial science course), it was tough for me to confidently determine when the answer key was wrong. A senior, still active research faculty member said that he found errors in an answer key..that in some cases..the interval of absolute convergence for some power series was given as a closed interval.

I was a bit taken aback; I gently reminded him that \sum \frac{x^k}{k^2} was such a series.

I know what he was confused by; there is a theorem that says that if \sum a_k x^k converges (either conditionally or absolutely) for some x=x_1 then the series converges absolutely for all x_0 where |x_0| < |x_1| The proof isn’t hard; note that convergence of \sum a_k x^k means eventually, |a_k x^k| < M for some positive M then compare the “tail end” of the series: use |\frac{x_0}{x_1}| < r < 1 and then |a_k (x_0)^k| = |a_k x_1^k (\frac{x_0}{x_1})^k| < |r^k|M and compare to a convergent geometric series. Mind you, he was teaching series at the time..and yes, is a senior, research active faculty member with years and years of experience; he mentored me so many years ago.

4. Also…one time, a sharp young faculty member asked around “are there any real functions that are differentiable exactly at one point? (yes: try f(x) = x^2 if x is rational, x^3 if x is irrational.

5. And yes, one time I had forgotten that a function could be differentiable but not be C^1 (try: x^2 sin (\frac{1}{x}) at x = 0

What is the point of all of this? Even smart, active mathematicians forget stuff if they haven’t reviewed it in a while…even elementary stuff. We need time to review our courses! But…does this actually affect the students? I am almost sure that at non-elite universities such as ours, the answer is “probably not in any way that can be measured.”

Think about it. Imagine the following statements in a differential equations course:

1. “Laplace transforms exist only for functions of exponential order (false)”.
2. “We will restrict our study of Laplace transforms to functions of exponential order.”
3. “We will restrict our study of Laplace transforms to functions of exponential order but this is not mathematically necessary.”

Would students really recognize the difference between these three statements?

Yes, making these statements, with confidence, requires quite a bit of difference in preparation time. And our deans and administrators might not see any value to allowing for such preparation time as it doesn’t show up in measures of performance.

September 8, 2018

Proving a differentiation formula for f(x) = x ^(p/q) with algebra

Filed under: calculus, derivatives, elementary mathematics, pedagogy — collegemathteaching @ 1:55 am

Yes, I know that the proper way to do this is to prove the derivative formula for f(x) = x^n and then use, say, the implicit function theorem or perhaps the chain rule.

But an early question asked students to use the difference quotient method to find the derivative function (ok, the “gradient”) for f(x) = x^{\frac{3}{2}} And yes, one way to do this is to simplify the difference quotient \frac{t^{\frac{3}{2}} -x^{\frac{3}{2}} }{t-x} by factoring t^{\frac{1}{2}} -x^{\frac{1}{2}} from both the numerator and the denominator of the difference quotient. But this is rather ad-hoc, I think.

So what would one do with, say, f(x) = x^{\frac{p}{q}} where p, q are positive integers?

One way: look at the difference quotient: \frac{t^{\frac{p}{q}}-x^{\frac{p}{q}}}{t-x} and do the following (before attempting a limit, of course): let u= t^{\frac{1}{q}}, v =x^{\frac{1}{q}} at which our difference quotient becomes: \frac{u^p-v^p}{u^q -v^q}

Now it is clear that u-v is a common factor..but HOW it factors is essential.

So let’s look at a little bit of elementary algebra: one can show:

x^{n+1} - y^{n+1} = (x-y) (x^n + x^{n-1}y + x^{n-2}y^2 + ...+ xy^{n-1} + y^n)

= (x-y)\sum^{n}_{i=0} x^{n-i}y^i (hint: very much like the geometric sum proof).

Using this:

\frac{u^p-v^p}{u^q -v^q} = \frac{(u-v)\sum^{p-1}_{i=0} u^{p-1-i}v^i}{(u-v)\sum^{q-1}_{i=0} u^{q-1-i}v^i}=\frac{\sum^{p-1}_{i=0} u^{p-1-i}v^i}{\sum^{q-1}_{i=0} u^{q-1-i}v^i} Now as

t \rightarrow x we have u \rightarrow v (for the purposes of substitution) so we end up with:

\frac{\sum^{p-1}_{i=0} v^{p-1-i}v^i}{\sum^{q-1}_{i=0} v^{q-1-i}v^i}  = \frac{pv^{p-1}}{qv^{q-1}} = \frac{p}{q}v^{p-q} (the number of terms is easy to count).

Now back substitute to obtain \frac{p}{q} x^{\frac{(p-q)}{q}} = \frac{p}{q} x^{\frac{p}{q}-1} which, of course, is the familiar formula.

Note that this algebraic identity could have been used for the old f(x) = x^n case to begin with.

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.

December 22, 2015

Multi leaf polar graphs and total area…

Filed under: calculus, elementary mathematics, integrals — Tags: , — collegemathteaching @ 4:07 am

I saw polar coordinate calculus for the first time in 1977. I’ve taught calculus as a TA and as a professor since 1987. And yet, I’ve never thought of this simple little fact.

Consider r(\theta) = sin(n \theta), 0 \theta \ 2 \pi . Now it is well know that the area formula (area enclosed by a polar graph, assuming no “doubling”, self intersections, etc.) is A = \frac{1}{2} \int^b_a (r(\theta))^2 d \theta

Now the leaved roses have the following types of graphs: n leaves if n is odd, and 2n leaves if n is even (in the odd case, the graph doubles itself).




So here is the question: how much total area is covered by the graph (all the leaves put together, do NOT count “overlapping”)?

Well, for n an integer, the answer is: \frac{\pi}{4} if n is odd, and \frac{\pi}{2} if n is even! That’s it! Want to know why?

Do the integral: if n is odd, our total area is \frac{n}{2}\int^{\frac{\pi}{n}}_0 (sin(n \theta)^2 d\theta = \frac{n}{2}\int^{\frac{\pi}{n}}_0 \frac{1}{2} + cos(2n\theta) d\theta =\frac{\pi}{4} . If n is even, we have the same integral but the outside coefficient is \frac{2n}{2} = n which is the only difference. Aside from parity, the number of leaves does not matter as to the total area!

Now the fun starts when one considers a fractional multiple of \theta and I might ponder that some.

August 1, 2015

Interest Theory: discounting

Filed under: applied mathematics, elementary mathematics — Tags: , — collegemathteaching @ 10:29 pm

Some time ago, I served in the U. S. Navy. The world “Navy” was said to be an acronym for Never Again Volunteer Yourself. But I forgot that and volunteered to teach a class on Mathematical interest theory. That means, of course, I have to learn some of this, and so I am going over a classic text and doing the homework.

The math itself is pretty simple, but some of the concepts seem strange to me at this time. So, I’ll be using this as “self study” prior to the start of the semester, and perhaps I’ll put more notes up as I go along.

By the way, if you are interested in the notes for my undergraduate topology class, you can find them here.

Discounting: concepts, etc. (from this text) (Kellison)

Initial concept:

Suppose you borrow 100 dollars for one year at 8 percent interest. So at time 0 you have 100 dollars and at time 1, you pay back 100 + (100)(.08) = 108.
Now let’s do something similar via “discounting”. The contract is for 100 dollars and the rate is an 8 percent discount. The bank takes their 8 percent AT THE START and you end up with 92 dollars at time zero and pay back 100 at time 1.

So the difference is: in interest, the interest is paid upon pay back, and so the amount function is: A(t) = (1+it)A(0) . In the discount situation we have A(1)(1-d(1)) = A(0) where d is the discount rate. So the amount function is A(t) = \frac{A(0)}{1-dt} where t \in [0, \frac{1}{d})

If we used compound interest, we’d have A(t) = (1+i)^tA(0) and in compound discount we’d have A(t) = \frac{A(0)}{(1-d)^t}

This leads to some interesting concepts.

First of all, there is the “equivalence concept”. Think about the above example: if getting 92 dollars now lead to 100 dollars after one period, what interest rate would that be? Of course it would be \frac{8}{92} = .087. So what we’d have is this: i = \frac{d}{1-d} or d = \frac{i}{1+i} .

Effective rates: this is only of interest in the “simple interest” or “simple discount” situation.

Let’s start with simple interest. The amount function is of the form A(t) = (1 +it)A(0) . The idea is that if you invest, say, 100 dollars earning, say, 5 percent simple interest (NO compounding), then in one year you get 5 dollars of interest, 2 years, 10 dollars of interest, 3 years 15 dollars of interest, etc. You can see the problem here; say at the end of year one your account was worth 105 dollars and at the end of year 2, it was worth 110 dollars. So, in effect, your 105 dollars earned 5 dollars interest in the second year. Effectively, you earned a lower rate in year 2. It got worse in year 3 (110 earned only 5 dollars).

So the EFFECTIVE INTEREST in period n is \frac{A(n) - A(n-1)}{A(n-1)} = \frac{1 + ni)-(1+(n-1)i)}{1+(n-1)i}=\frac{i}{1+(n-1)i} which you can see goes to zero as n goes to infinity.

Effective discount works in a similar manner, though we divide by the amount at the end of the period, rather than the beginning of it:

\frac{A(n)-A(n-1)}{A(n)} = \frac{\frac{1}{1-nd} - \frac{1}{1-(n-1)d}}{\frac{1}{1-nd}} = \frac{d}{1-(n-1)d}

May 31, 2015

And a Fields Medalist makes me feel better

Filed under: calculus, editorial, elementary mathematics, popular mathematics, topology — Tags: — collegemathteaching @ 10:30 pm

I have subscribed to Terence Tao’s blog.

His latest post is about a clever observation about…calculus: in particular is is about calculating:

\frac{d^{k+1}}{dx^{k+1}}(1+x^2)^{\frac{k}{2}} for k \in \{1, 2, 3, ... \} . Try this yourself and surf to his post to see the “slick, 3 line proof”.

But that really isn’t the point of this post.

This is the point: I often delight in finding something “fun” and “new to me” about an established area. I thought “well, that is because I am too dumb to do the really hard stuff.” (Yes, I’ve published, but my results are not Annals of Mathematics caliber stuff. 🙂 )

But I see that even the smartest, most accomplished among us can delight in the fun, simple things.

That makes me feel better.

Side note: I haven’t published much on this blog lately, mostly because I’ve been busy updating this one. It is a blog giving notes for my undergraduate topology class. That class was time consuming, but I had the teaching time of my life. I hope that my students enjoyed it too.

April 8, 2015

How my running (and walking and swimming and weight lifting and sports experience) helps with my teaching

Filed under: algebra, editorial, elementary mathematics — Tags: — collegemathteaching @ 4:52 pm

If you teach at an institution that has a competitive sports team, you’ll probably notice that the coaches spend time on recruiting. It is easy to see why: though athletes train hard to improve their performances, their inherent athletic ability provides an upper bound of how well they will do.

I played sports in high school, but wasn’t within an AU of being able to compete at the college level, any division. I remember summer wrestling; those recruited to wrestle for our team basically had their way with me on the mat.

In my current sports, I always do poorly in competition. For example, in my best running marathon, the winner beat me by 74 minutes! (winning time was 2:19).

It wasn’t that I didn’t try or didn’t train: it was that because I am a poor natural athlete, training only “moves the needle” just a bit, and not nearly enough for me to be competitive.

A coach could give me this workout or that workout…and get angry with me. But I have athletic limitations.

The same principle applies in mathematics.

Right now I am teaching the second semester of calculus for non-technical majors.

One question was: find the maximum and minimum of T(t) = 55 -21 cos(\frac{2 \pi (t-32)}{365}) . They were told that this function modeled daily temperature where t was in days, t=0 on January 1.

Now I asked the class some questions. And, well, let’s just say that they didn’t just recognize what the various terms and factors meant.

Now we took the derivative to find the local maximum and local minimum values and most of them got \frac{42 \pi}{365}sin(\frac{2 \pi (t-32)}{365}) . Now we set this equal to zero and all of them that we got zero when the argument was 0 or an integral multiple of \pi .

But now, when we had \frac{2 \pi (t-32)}{365} = 0 I said “of course, this gives us the solution t = 32 . And you guessed it…one of the students asked “why”. It took about a minute of explanation for her to see it. I kid you not.

So, I reminded myself of what it must have been like for my sports coaches in high school…..what it was like for them to work with me.

Older Posts »

Blog at