MitPY 6: Integration by Substitution

From frequent commenter, SRK:

A question for commenters: how to explain / teach integration by substitution? To organise discussion, consider the simple case

    \[\boldsymbol{ \int \frac{2x}{1+x^2}dx \,.}\]

Here are some options.

1) Let u = 1 + x^2. This gives \frac{du}{dx} = 2x, hence dx = \frac{du}{2x}. So our integral becomes \int \frac{2x}{u}\times \frac{du}{2x} = \int \frac{1}{u}du. Benefits: the abuse of notation here helps students get their integral in the correct form. Worry: I am uncomfortable with this because students generally just look at this and think “ok, so dy/dx is a fraction cancel top and bottom hey ho away we go”. I’m also unclear on whether, or the extent to which, I should penalise students for using this method in their work.

2)  Let u = 1 + x^2. This gives \frac{du}{dx} = 2x. So our integral becomes \int \frac{1}{u}\times \frac{du}{dx}dx = \int \frac{1}{u}du. Benefit. This last equality can be justified using chain rule. Worry: students find it more difficult to get their integral in the correct form.

3) \frac{2x}{1+x^2} has the form f'(g(x))g'(x) where g(x)=1+x^2 and f'(x) = \frac{1}{x}. Hence, the antiderivative is f(g(x)) = \log (1+x^2). This is just the antidifferentiation version of chain rule.  Benefit. I find this method crystal clear, and – at least conceptually – so do the students. Worry. Students often aren’t able to recognise the correct structure of the functions to make this work.

So I’m curious how other commenters approach this, what they’ve found has been effective / successful, and what other pros / cons there are with various methods.

UPDATE (21/04)

Following on from David’s comment below, and at the risk of splitting the discussion in two, we’ve posted a companion WitCH.

MitPY 4: Motivating Vector Products

A question from frequent commenter, Steve R:

Hi, interested to know how other teachers/tutors/academics …give their students a feel for what the scalar and vector products represent in the physical world of \boldsymbol{R^2} and \boldsymbol{R^3} respectively. One attempt explaining the difference between them is given here. The Australian curriculum gives a couple of geometric examples of the use of scalar product in a plane, around quadrilaterals, parallelograms and their diagonals .

Regards, Steve R

MitPY 2: Change of Base in Logarithms

This post is an offshoot of our offer of free maths help to anyone and everyone. Frequent commenter RF started the ball rolling, asking how one might teach (= understand) the change of base for logarithms:

    \[\boldsymbol{\log_ax = \dfrac{\log_bx}{\log_ba}}\]

I’ll leave it as open as possible for teacher-commenters to discuss. I honestly don’t know how I’d teach it, and I have difficulty understanding it myself. But here are some preliminary thoughts.

Logarithms are intrinsically difficult because they are inverse things, implying that untangling any logarithmic statement also requires untangling the inverses, to get to the exponentials. This suggests any reasonable approach to the above identity must be grounded in some uninverted, exponential fact(s).

Pondering it quickly, I can see three ways that, together or separately, may lead to some understanding of the above identity:

  • First, multiply through to get rid of the fractions. (Never a bad bet.)
  • Second, think of a special case(s) that are easier to think of exponentially and to understand.
  • Third, give things names: if you want to understand, for example, what \boldsymbol{\log_ax} means then write \boldsymbol{\log_ax}= A. That then gives you the bones to be able to play around with the underlying exponential meaning.
I’ll leave it there, until others have commented.

UPDATE (25/03/20) Thanks to everyone who has commented so far. I’ll look more carefully at the discussion later on, when I can breathe. But, as long as people are happily discussing things, I’ll take a back seat. After the conversation has about run its course, I’ll try to summarise up top the smartness in the various approaches. Just a couple quick points:

  • I definitely should have included an experiment/special-cases dot point along the lines suggested by Storyteller in the comments.
  • For those who want to experiment with what LaTeX does and doesn’t work in comments, you can experiment here.
I can also edit comments (a power I plan to use only for niceness, rather than evil). So, I’ll fix up some of the TeX glitches in comments later today.

UPDATE (28/03/20)

Thanks to all the commenters below. Here’s an, um, “summary” of the discussion. (It’s intended to be slow and gentle, and could be further gentled for students/classes by the inclusion of numerical examples.)

Part 1 (Where log rules come from) We want to make sense of the change of base formula

    \[\color{magenta}\boxed{\boldsymbol{\log_ax = \dfrac{\log_bx}{\log_ba}}}\]

That’s not obvious, since the inverseness of logarithms obscures everything. So, let’s forget about chasing the weird formula, and first get back to thinking about powers. Remember the fundamental meaning of logarithms:

    \[\color{red}\boxed{\boldsymbol{\log_b x = B \quad \Longleftrightarrow \quad  b^B  = x}}\]

That is, any logarithm equation is just an exponential/power equation, thought of from a different direction: what power of \boldsymbol{b} gives us \boldsymbol{x} (answer \boldsymbol{B}), rather than what does \boldsymbol{b} to the power of \boldsymbol{B} give us (answer \boldsymbol{x})? Ultimately, as Terry emphasised, any log rule must come from a corresponding power rule via this equivalence. For example, note that

    \[\boldsymbol{b^D = a \quad \Longrightarrow \quad  b^{AD}  = a^A} \qquad \mbox{(because $\left(b^{D}\right)^A= b^{AD}).}\]

That simple power manipulation gives us the log rule

    \[\color{blue}\boxed{\boldsymbol{\log_b \negthinspace \left(a^A\right) = A\log_ba}}\]

(In words, the power needed to give us \boldsymbol{a^A} is \boldsymbol{A} times the power to give us \boldsymbol{a}.)  

Part 2 (Experimentation) We’ll give a more direct approach to the change of base rule in Part 3. First, we can experiment in the manner suggested by RF, and explored at length by Storyteller (aka Proust). Let’s think about powers of 3. We have \boldsymbol{3^6 = 729} or, in log form, \boldsymbol{\log_3729 = 6}. But then, as powers of \boldsymbol{3^2}, we have \boldsymbol{\left(3^2\right)^3 = 729} or \boldsymbol{\log_{3^2}729 = 3}. We can summarise this in log form as

    \[\boldsymbol{\log_{3^2}729  =    \frac{\log_3 729}{2}\,.}\]

Notice that at its heart this calculation is just the blue power rule we proved above. And, critically, it is no coincidence that the 2 appears twice: on the left as a power and on the right as the denominator.

We now wave the Mathologer magic wand (perhaps after more experimentation). We replace the 3 by \boldsymbol{b}, the 2 by \boldsymbol{B} and (with much more trepidation) the 729 by \boldsymbol{x}. With fingers crossed, that gives

    \[\color{blue}\boxed{\boldsymbol{\log_{b^B}x  =    \frac{\log_b x}{B}}}\]

This is a change of base rule for logs we can actually understand: it tells us that if \boldsymbol{b^B} is the base then we need (1/\boldsymbol{B})th the power than if \boldsymbol{b} were the base. And, again, this is just the blue power rule, but written in log form.

Lastly, let’s write \boldsymbol{b^B =a}. Then \boldsymbol{B = \log_ba}, and our blue log rule now takes the form

    \[\color{magenta}\boxed{\boldsymbol{\log_{a}x  =    \frac{\log_b x}{ \log_ba}\,.}}\]

This is exactly the magenta log rule we’re after, and we’ve kind of semi-proved it. The gaps are justifying that:

(i) Any \boldsymbol{x} can be written in terms of the bases \boldsymbol{b} and \boldsymbol{b^B};

(ii) Any \boldsymbol{a} can be written in terms of the base \boldsymbol{b};

(iii) The blue power rule holds in this more general context.

That is, the proper justification of the change of base rule requires a deeper exploration of the real numbers and is, therefore, pretty much outside the school world.

Part 3 (More direct “proof”) This is essentially the proof given by Franz, Glen and Anonymous, but framed more like SRK’s argument. The change of base rule for logarithms has to do with quantities written with different bases. So, let’s ask that question directly. Suppose we have something with base \boldsymbol{a} and we want to write it as something with base \boldsymbol{b}. That is, if we have

    \[\boldsymbol{x =a^A\,,}\]

how can we rewrite

    \[\boldsymbol{x =b^B\,?}\]

(The question can be made more concrete by specifying to common numerical bases. So, one can ask how to rewrite 10^X, or even 10^6, as 2^Y or e^Z. Even more concretely, we can be back in the experimental world of Part 2.)

Well, what power of \boldsymbol{b} do we need to get \boldsymbol{a^A}? The answer to that must be \boldsymbol{B = \log_b \left(a^A\right)}, by the very definition of logarithms. But then our blue power rule tells us

    \[\color{magenta}\boxed{\boldsymbol{b^B = a^A \quad \Longrightarrow \quad  B  = A\log_ba} }\]

This magenta power rule tells us how to change from one base to another, so it is really all we need to know. In fact, we don’t even need to that much: in this case, it is better to remember the technique rather than the formula. But, let’s go one step further.

Write \boldsymbol{x} for the common quantity \boldsymbol{x = a^A = b^B}. Then \boldsymbol{A = \log_ax} and \boldsymbol{B = \log_bx}, and our magenta power rule becomes

    \[\color{magenta}\boxed{ \boldsymbol{\phantom{A^A}\hspace{-7\jot}\log_bx   =   \log_ba\cdot \log_ax  \phantom{A^A}\hspace{-6\jot} }}}\]

This is exactly the magenta log rule we’re after, with the fraction multiplied out. As in Part 2, the proof assumes that logs and the blue power rule work for general real numbers, not just for 3^6 and the like.  

Update (1/04/20)

Just a “quick” update in response to some log conversation on this post. There is the question of whether beginning with logarithms as the inverse of exponentials is the “right” place to start. The answer is both “Of course” and “Well, maybe not”. The “Of course” comes, of course, from wanting a language early on to deal with undoing exponential equations, and logarithms provide that language: \boldsymbol{\log_28} is just the symbolic manner of saying “The number you raise 2 to to get 8”.

So, why the “Maybe not”? What’s the problem? The problem is that this convenient logarithm language tricks us into thinking we know things that we don’t. For example, we can blithely write \boldsymbol{\log_25}, but what does this mean? Yes it’s “the number you raise 2 to to get 5”, but what is that number? How do we know our log rules work for such numbers, numbers that we can’t simply grab like 2 and 3 and 8?

This trickery actually arises earlier, with exponentials. We happily write, for instance, that \boldsymbol{2^{a+b} = 2^a\cdot 2^b}, without concerning ourselves with the a and the b. So, if a happens to be the number giving \boldsymbol{2^{a} = 5}, that’s just fine and we go ahead, logging away or whatever. At some point, however, we have to think about what exponentials really are. How do we know that \boldsymbol{2^{a+b} = 2^a\cdot 2^b} is true, and what does it even mean? What does \boldsymbol{2^{3/4}}, for example, mean? Or, \boldsymbol{2^{-3.157}}? Or, \boldsymbol{2^{\sqrt2}}?

In summary, we want to know that exponentials and exponential rules make sense and are true for any real numbers, not just natural numbers or (more ambitiously) integers or (more ambitiously) fractions. Without that, we can’t make proper sense of logarithms and log rules, unless we’re explicitly or implicitly sticking to \boldsymbol{\log_28} and the like.

So, what do we do? The first thing to do is to follow a strong and proud mathematical tradition: we cheat. We want exponentials and logarithms, and we think we have some sense of how they work? Then let’s just fake it and cross our fingers and carry on, hoping nothing bad happens. So, teachers draw the graph of \boldsymbol{y = 2^x} as if it all makes perfect sense, even though there’s not a hope in Hell of justifying that graph to most school students, and the overwhelming majority of school teachers and more than a few university lecturers would be unable to do it.

Is this cheating ok? Yes, no and no. Yes, it is ok, because there is no choice. Such cheating is unavoidable, in all areas of school mathematics. But no, it is not ok, because teachers should be much more aware of and, when appropriate, much more upfront about the existence of and the nature of such cheating. And no, it is not ok because in the end, we want our mathematics to be as solid as possible, rather than faith-based.

So how, in the end, do we sort this stuff out? Well, we can’t really do anything until we get a proper sense of real numbers. That’s standard undergrad stuff, although many maths majors (and thus many, many teachers) avoid it or are fed a pointlessly token version of it. And then, with real numbers in hand, we have a choice. The first choice is to fix the standard school approach: make proper sense of general exponentials, \boldsymbol{2^a} and whatnot, prove the exponential rules, and then go on to logarithms as inverses. The second approach, which is deeper and weirder but ends up being easier, is to first define the natural logarithm via integration. Then \boldsymbol{\operatorname{exp}(x) = e^x} is defined as the inverse of the natural logarithm. The exponential and log rules can be proved (mostly via calculus), and finally other exponentials and logarithms can be defined by change of basis calculations. It is a big project (which we can write about sometime, if people wish), but it is nice stuff.

In summary, to make real, proper sense of logarithms and log rules is a lot of work, and work that goes well beyond school mathematics. The moral? We do doodily do what we must muddily must.

Free Help: Maths in the Plague Year

I don’t really know if or how this’ll work, but I figure it’s worth a try. While you’re all locked at home in your individual countries/cities/houses/rooms, you may request help here on any maths problem, of any level: just ask your question in a comment on this post.

God knows what will happen, but I will do my best to give you some guidance in a reasonably prompt manner (within a day-ish).* Others are of course free to offer help, and if they do so then I will try to ensure any subsequent discussion progresses naturally and helpfully.

A couple quick points:

  • Do your best to ask the question briefly but clearly, and indicate why you’re asking it.
  • Hopefully LaTeX works in the comments (try $ latex [Your LaTeX code] $ ).
  • If the question is small and easily resolved then the discussion can stay on this page; for more involved questions, I’ll create a separate post for the discussion.
  • Please ask new (unrelated) questions in new comments, rather than replies to existing comments.
  • My approach to this kind of teaching is to be pretty Socratic, to try lead a student to the answer, rather than just providing the answer. So, don’t be surprised if you’re asked to go away and ponder some specific aspect of the question.
  • I don’t particularly care if the question comes from an assignment or whatever, though I prefer honesty on this point. (And, the more I suspect the question is somehow officially assigned work, the more Socratic I’m likely to be.)
  • No CAS garbage, in either the questions or the replies. This will be ruthlessly enforced.

Ask away.

*) The Riemann hypothesis may take a little longer.

UPDATE (25/03/20) Here is MitPY 2 (change of base for logarithms).

UPDATE (28/03/20) MitPY 2 is done and dusted. Any offerings for MitPY 3?

UPDATE (03/04/20) MitPY 3: What to teach at the beginning on Year 7.

UPDATE (05/04/20) MitPY 4: Motivating vector products.

UPDATE (06/04/20) MitPY 5: Implied domain and range.

UPDATE (18/04/20) MitPY 6: Integration by substitution.