## Calculus VIII: Miscellaneous Problems, I

In this post, I’ll continue discussing problems I’ve been encountering in the calculus textbook I’m reading.  Some problems are involved enough to require an entire post devoted to them; others are interesting but relatively short.  Today, I’ll discuss four shorter problems.

The first problem is Exercise 26 on page 33:

If a cylindrical hole be drilled through a solid sphere, the axis of the cylinder passing through the center of the sphere, show that the volume of the portion of the sphere left is equal to the volume of a sphere whose diameter is the length of the hole.

This is not a difficult problem to solve; I’ll leave the simple integral to the reader.  This has always been a favorite volume problem of mine, and this is the earliest reference I’ve seen to it.

Perhaps it was a classic even back then — remember, the book was published in 1954.  The author usually attributes problems he uses to their sources, but this problem has no attribution.  I would be interested to know if anyone knows of an earlier reference to this problem.

The second problem is not from an exercise, but is discussed in Art. 37 on page 48.  It’s one of those “of course!” moments, leaving you to wonder why you never thought to try it yourself….

Why is the antiderivative of $y=x^{-1}$ the natural logarithm?  There are a few different ways this is usually shown, but here’s one I haven’t seen before:  consider the limit

$\displaystyle\lim_{n\to-1}\int_a^bx^n\,dx,\quad 0

It seems so obvious when you see it written down, but I’ve never thought to take this limit before.  You get

$\displaystyle\lim_{n\to-1}\dfrac{b^{n+1}-a^{n+1}}{n+1}.$

Now apply L’Hopital’s rule!  And there you have it:

$\displaystyle\lim_{n\to-1}\int_a^bx^n\,dx=\log b-\log a.$

I think that perhaps when writing $x^n,$ I’m so conditioned to thinking of $n$ as a constant that I never thought of turning it into the variable.  It’s a nice proof.

Next is Art. 68, which begins on page 82.  Again, you’ll agree that it seems pretty obvious after the discussion, but I’ve never seen this diagram drawn before.  This is likely because hyperbolic trigonometry is downplayed in today’s calculus curriculum.  You might recall the comment I made about a colleague once saying they didn’t teach hyperbolic trigonometry since it wasn’t on the AP exam.

So let’s look at the hyperbola $x^2-y^2=a^2.$  The goal of this exercise is to find a geometrical interpretation of the relationship

$\sec\theta=\cosh u,$

which is key to connecting circular and hyperbolic trigonometry by means of the gudermannian, as I have discussed earlier.

Draw the auxiliary circle $x^2+y^2=a^2,$ and consider the point

$P=(a\cosh u,a\sinh u).$

Now drop a perpendicular from $P$ on the x-axis to the point $N=(a\cosh u,0).$  Next, draw a tangent from $N$ to the auxiliary circle, meeting it at $T.$  Finally, join $T$ to the origin.

Since $NT$ is tangent to the circle, we know that $\Delta NTO$ is a right triangle.  Therefore $ON=a\sec\theta.$  But by construction, $ON=a\cosh u,$ and so

$\sec\theta=\cosh u.$

Yep, that’s all there is to it!  A geometrical illustration of the gudermannian function.  So very simple.  And incidentally, the author goes on to discuss the gudermannian function in the next section.

For the last example, I’ll need to skip ahead a little bit, since my next exploration is a bit too involved and may need an entire post.  As a teaser, I’ll just say that I learned a completely new way to derive Cardan’s formula for solving a cubic equation!  It involves calculus and quite a bit of algebra.  At some point, I’d like to dive in a little deeper and see if I can relate this new proof with the usual one — but again, that for another time.

So this last example (Art. 96 on page 109) is about differentiating

$y=e^{ax}\sin(bx).$

Of course this is just a simple application of the product rule:

$\dfrac{dy}{dx}=e^{ax}(a\sin(bx)+b\cos(bx)).$

But why stop here?  We can go further, using an idea very common when working with physics applications.  We seek to write

$a\sin(bx)+b\cos(bx)=c\sin(bx+\theta).$

Since

$c\sin(bx+\theta)=c\sin(bx)\cos(\theta)+c\cos(bx)\sin(\theta),$

this amounts to solving

$c\cos(\theta)=a,\quad c\sin(\theta)=b.$

This is straightforward:

$c=\sqrt{a^2+b^2},\quad\theta=\arctan(b/a).$

Thus,

$\dfrac{dy}{dx}=\sqrt{a^2+b^2}\,e^{ax}\sin(bx+\arctan(b/a)).$

This means that taking the derivative of $e^{ax}\sin(bx)$ amounts to multiplying the function by $\sqrt{a^2+b^2}$ and increasing the angle in the sine function by $\arctan(b/a).$  Therefore

$\dfrac{d^n}{dx^n}e^{ax}\sin(bx)=(a^2+b^2)^{n/2}e^{ax}\sin(bx+n\arctan(b/a)).$

I actually did the proof by induction to verify this.  It’s pretty cumbersome.

Note that this also implies that

$\displaystyle\int e^{ax}\sin(bx)\,dx=\dfrac{e^{ax}\sin(bx-\arctan(b/a))}{\sqrt{a^2+b^2}}.$

The same results hold with sine being replaced by cosine.  Such elegant results.

I hope you found these problems as interesting as I did!  There are so many calculus gems in this book.  I’ll continue to keep sharing….

## Calculus VII: Approximations

Although I’ll have a very busy summer with consulting, I’ve taken some time to start reading more again.  You know, those books which have been sitting on your shelves for years….

So I’ve started Volume I of A Treatise on the Integral Calculus by Joseph Edwards.

I include a picture of the cover page, since you can google it and download a copy online.  Between Volumes I and II, there’s about 1800 pages of integral calculus….

Since I’ll likely be working with a calculus curriculum later this year, I thought I’d look at some older books and see what calculus was like back in the day.  I’m continually surprised at how much there is to learn about elementary calculus, despite having taught it for over 25 years.

My approach will be a simple one — I’ll organize my posts by page number.  As I read through the books and solve interesting problems, I’ll share with you things I find novel and interesting.  The more I read books like these and think about calculus, the more I think most current textbooks simply are not up to the task of presenting calculus in any meaningful way.  Sigh.

This is not the time to be on my soapbox — this is the time for some fun!  So here is the first topic:  Weddle’s Rule, found on page 21.

Ever hear of it?  Bonus points if you have — but I never did.  It’s another approximation rule for integrals.  Here it is: given a function $f$ on the interval $[a,b],$ divide the interval into six equal subintervals with points $x_0, x_1,\ldots x_6$ and corresponding function values $y_0=f(x_0),\ldots,y_6=f(x_6).$  Then

$\displaystyle\int_a^bf(x)\,dx\approx \dfrac{b-a}{20}\left(y_1+5y_2+y_3+6y_4+y_5+5y_6+y_7\right).$

Yikes!  Where did that come from?  I’ll present my take on the idea, and offer a theory.  If there are any historians of mathematics out there, I’d be happy to hear if my theory is correct.

One reason most of us haven’t heard of Weddle’s Rule is that approximations aren’t as important as they were before calculators and computers.  So many exercises in this book involve approximation techniques.

So how would you come up with Weddle’s Rule?  I’ll share my (likely mythical) scenario with you.  It’s based on some notes I wrote up a while ago on Taylor series.  So before diving into Weddle’s Rule, I’ll show you how I’d derive Simpson’s Rule — the technique is the same, but the algebra is easier.  And by the way, if anyone has seen this technique before, please let me know!  I’m sure it must have been done before, but I’ve never been able to find a source illustrating it.

Let’s assume we want to approximate

$F(x)=\displaystyle\int_a^xf(t)\,dt$

by using three equally-spaced points on the interval $[a,x].$  In other words, we want to find weights $p,$ $q,$ and $r$ such that

$S(x)=\left(p f(a)+ q f\left(\dfrac{a+x}2\right)+rf(x)\right)(x-a)\approx F(x).$

How might we approach this?  We can create Taylor series for $F(x)$ and $S(x)$ about the point $a.$  The first is easy using the Fundamental Theorem of Calculus, assuming sufficient differentiability:

$F(x)=f(a)(x-a)+\dfrac{f'(a)}{2!}(x-a)^2+\dfrac{f''(a)}{3!}(x-a)^3+\cdots$

Now to construct the Taylor series of $S(x)$ about $x=a,$ we need to evaluate several derivatives at $a.$ This is not difficult to do by hand, but it is easy to do using Mathematica and a command such as

Doing so yields the following:

Now the problem becomes a simpler algebra problem — to force as many of the coefficients of the derivatives on the right-hand side to be $1$ as possible.  This will make the derivatives of $F$ and $S$ match, and the Taylor polynomials will be equal up to some order.

Solving the first three such equations,

yields, as we expect, $p=1/6,$ $q=2/3,$ and $r=1/6.$ Note that these values also imply that

$\dfrac12q+4r=1,$

but

$\dfrac5{16}q+5r=\dfrac{25}{24}.$

This implies that

$S(x)-F(x)=\dfrac1{24}\cdot\dfrac{(x-a)^5}{5!}+O((x-a)^6)$

on each subinterval, so that

$S(x)-F(x)=O((x-a)^5)$

on each subinterval, giving that Simpson’s rule is $O((x-a)^4).$

So how we apply these to derive Weddle’s rule?  We could try to find weights $w_1,\ldots w_7$ to create an approximation

$W(x)=\left(w_1 f(a)+w_2f\left(\dfrac{5a+x}6\right)+\cdots+w_7f(x)\right)(x-a).$

If we apply precisely the same procedure as we did with Simpson’s Rule, we get the following as the sequence of weights to create the best approximation:

$\dfrac{41}{840},\ \dfrac9{35},\ \dfrac9{280},\ \dfrac{34}{105},\ \dfrac9{280},\ \dfrac9{35},\ \dfrac{41}{480}.$

Not exactly easy to work with — remember, no calculators or computers.

So let’s make the approximation a little worse.  Recall how the weights were found — a system of seven equations in seven unknowns was solved, analogous to the three equations in three unknowns for Simpson’s rule.  Instead, we specify $w_1,$ and solve the first six equations in terms of $w_1.$  This gives us

Now all weights must be positive; this gives the constraint

$0.046\overline6\approx\dfrac7{150}

Let’s put $w_1=1/20,$ which is in the interval just described.  This gives the sequence of weights to be

$\dfrac1{20},\ \dfrac5{20},\ \dfrac1{20},\ \dfrac6{20},\ \dfrac1{20},\ \dfrac5{20},\ \dfrac1{20},$

where all fractions are written with the same denominator.  Now imagine factoring out the $1/2,$ and you notice that all divisions are by 10.  Can you see the advantage?  If you have a table of values for your functions, you just need to multiply function values by a single-digit number, and then move the decimal place over one.  An approximators dream!

So Weddle’s approximation is exact for fifth-degree polynomials, even though it is possible to use six subintervals to get weights which are exact for sixth-degree polynomials.  Yes, we lose an order of accuracy — but now our computations are much easier to carry out.

Was this Weddle’s thinking?  I can’t be sure; I wasn’t able to locate the original article online.  But it is a way for me to make sense out of Weddle’s rule.

I will admit that in a traditional calculus class, I don’t address approximations in this way.  There is a time crunch to get “everything” done — that is, everything the student is expected to know for the next course in the calculus sequence.

Should these concepts be taught?  I’ll make a brief observation:  in reading through the first 200 pages of this calculus book, it seems that all that has changed since 1954 is that content was pared down significantly, and more calculator exercises were added.

This is not the solution.  We need to rethink what students need to now know and how that material should be taught in light of emerging technology.  So let’s get started!

## Still Moving On (and BAMAS IX)….

Time for the sequel to last week’s post!  Last week, I talked about a major change in my career — moving from the classroom to full-time consulting.  This week, I’ll talk more about the mental/psychological aspects of the change.

But first, I want to give a brief recap of our ninth Bay Area Mathematical Art Seminar. Because of my move — and lack of affiliation with a university — we met at a coffee shop in my new neighborhood at 3:00ish yesterday for show-and-tell and an informal discussion.  One participant, Stan, brought a selection of puzzles from his extensive collection, which kept many of us occupied for some time.  Of course we never have a shortage of things to talk about.

We then moved on, as usual, to dinner.  It turns out that there is a fantastic Nepalese restaurant in Bernal Heights.  We would typically find a Thai or Indian place near USF for dinner, and this Nepalese place was close to Indian in flavor — but better than any of the places we’d been to before.

I think we’ll be back again.  So far, five from our group have offered to host a seminar on occasion.  This means that if several of us host just one or twice a year, we can keep the group going.  We are all very excited by this!  One of my biggest worries was that finding a venue would be a big hurdle in keeping the seminars going, but we’ve already got volunteers for July and August.  So full steam ahead!

This informal meeting didn’t warrant an entire blog post, but I wanted to make sure it was in the archives….

Back to the career change.  The biggest issue was deciding whether or not to leave the brick-and-mortar academic environment.  I will admit that I was pretty selective in terms of schools I applied to — since I had a backup plan, I had to think each time:  would I prefer teaching in (insert location), or staying with my friends in Florida?  I had lived in the middle of nowhere before — my first full-time teaching position was in west central Illinois.  Can you name even one city in west central Illinois?  I thought not….

I had actually done the Florida thing about four years ago while I was transitioning from Princeton to San Francisco — I spent six months there doing some online work and looking for jobs.  So I knew it would be fine.

And then the consulting gig came into play.  Totally unexpected.  The process for bringing in consultants is way simpler than the process for bringing in new faculty members, which is why it took only about a month before I signed a contract.  Keep in mind that I did this before knowing for certain whether or not the academic positions I applied for would amount to anything.

As you know, they didn’t.  So was I willing to give a consulting career a chance?  It was a lot riskier than an academic job.  I have to admit that right now, things look pretty stable.  But I’ve done some consulting before, and it can dry up all of a sudden.  For example, I was consulting for a firm whose major client was considering dropping their account, and all resources went to making sure that client stayed on.  I was expendable.  It happens.

What about benefits?  Oh, there are none….  No health insurance, no contributions to my retirement account.  When teaching at USF, I applied for and was granted in excess of $15,000 for conference travel. In the summer of 2016, as an example, I was awarded$5000 for travel to two conferences in Europe.  This perk would go away.

Further, could I handle working from home?  As a professor, I was used to a lot of interaction with students and faculty on a regular basis.  Now I’d be on my own during the day, every day.  I talked a lot with friends Cory and Sandy about this particular issue.

You see, it’s different when you’re your own boss.  I can tell you, since I’ve had an entire week’s experience at it….  When I was still teaching, every time I worked on one of my lectures for the online course and finished it, I’d think, “Hey, I’m getting ahead of the game!  This’ll make my summer a little bit easier.”  But when I woke up last Monday morning, all I could think was, “Oh, I am soooo far behind.”

Thankfully, I had a good long chat with my dear friend Cory, after which I sat down and made a brief — tentative — schedule of my entire summer.  Then I felt much better, though there is still a big unknown:  I haven’t produced a video yet (I’ll tackle my first one tomorrow!), so it is difficult to estimate how long that process will take.  Though presumably it will take less time the more of them I make.

And working at home all the time?  I’ve already had two “play dates” last week.  Friends Nick and Stacy came over on two separate days, and we just worked on our own things together at my place.  Yes, we chatted now and then, and I would occasionally answer some mathematical questions.  But otherwise, we focused pretty well on our own work.  I really enjoy working this way.  It helps to have someone there, since you’re less likely to be distracted doing something useless online….

Also, I’m trying to find other activities which get me out interacting with other people.  For example, I started going to the Gay Men’s Buddhist Fellowship on Sunday mornings again — I had done so for a few weeks about a year ago, but stopped once the academic year ramped up.  But now, I’m making more of an effort.

Yes, it’s exciting, but no, it’s not glamorous.  There’s potential to make more money than I did teaching, but there’s also the risk and added stress of being your own boss.  The jury is still out.

One thing I am insistent upon is that I can do all my work remotely.  I’ve already planned a trip to England and Serbia in October.  And since the couple who owns the place I’m renting needs the apartment in January and February for family, I’ll be spending those months in Florida.  It’s nice to have the flexibility to do that.

So let the adventure begin!  I’ll probably continue this thread and let you know how things progress — maybe every three months or so.  And if you’ve got any tips for working from home that you’d like to share, please comment!  Until next time….

## Moving Out and Moving On….

This week marks a new beginning for me.  I don’t really write about myself that much on my blog, but I’d like to share a new direction my life is taking since it will definitely influence what my blog will look like in the future.

When I began teaching at the University of San Francisco in January 2015, I knew it was only temporary; my initial contract was for three semesters.  With faculty on sabbatical and maternity leave, someone was needed to teach in the department until those faculty returned.

I was fortunate to have had two one-year extensions to that contract.  But this past year, my contract was not renewed, despite support from the department and the Dean’s office.  The decision not to renew was made at the Provost level.

I found this out early on last Fall semester.  Of course that meant the inevitable job search — announcements of academic positions start being posted early in October.  This process is never pleasant, and takes up a lot of time.  For example, I spent over twenty hours on one particularly challenging, non-routine application.

While I had two phone interviews and one on-site interview, no offers were forthcoming.  But in mid-February, I read an announcement asking for consultants to help develop and implement a series of online lectures.  This is to aid in developing a flipped classroom, where students watch a set of brief videos on a mathematical topic before they come to class.  Because the students already have been exposed to the basic ideas, the teacher can spend face-to-face class time developing these ideas and having students work on activities and projects.  In other words, students enjoy a richer classroom experience because they come to class already armed with basic concepts.

By mid-March, I had signed a consulting contract.  Yes, I was still teaching at USF, but the deadline for the project was August 31.  So even if I did get an academic job, I would have the summer to work on the project.  Also, I did have some time during the semester to begin the work.

None of the academic positions panned out, and it was nearing the end of April.  I had some big decisions to make.  A parallel thread was all the drama going on where I lived — I shared a floor of a house with five other housemates.  I could write an entire post on this subject, but the upshot was that I was moving out at the end of May.

That might not sound like a big deal — but the housing situation in San Francisco is tremendously challenging.  I just recently heard a statistic that 100,000 new jobs are created in SF each year, but only 12,000 units of housing are being developed.

Moreover, there is such a demand for housing, you really can’t start looking more than a month out.  So I couldn’t start looking until May 1.

Plan A was to find an affordable (relative to San Francisco housing prices, that is), furnished (ideally) studio apartment near the Mission.  I knew that because I was doing so much work at home, I’d need a place that got plenty of light, and where I would feel comfortable spending large chunks of time.

If that didn’t work out, it was on to Plan B.  I’d drive across the country to live with dear friends Cory and Larry near Tampa.  Because my consulting could all be done remotely, it didn’t matter where I was physically located.  So I had a fairly large safety net beneath me.

On Thursday, May 3, I had lunch with my friend Wes, who has a tutoring business.  I thought I’d pick his brain on how he got set up, since I thought supplementing consulting with tutoring would be complementary, and ensure I could afford to live in San Francisco.

Imagine my surprise when he offered me a job!  I said I was interested, but that I wouldn’t be able to start until the Fall.  Too much was going on.

Later on that day, I went to look at a studio apartment.  Cynthia and I had a one-and-a-half hour meeting, and the place was great!  I was ready to take the place right then, but…there was an application process, and lots of other people were looking at the place. So I went home and filled out the application right away.

The next morning I got a call — I could have the place if I wanted it!  I could hardly believe my good fortune.  I immediately said yes.  An opportunity like this was not likely to come along again soon.

So my life was completely up in the air on April 30, and by May 4, I had another job offer and a place to live!  I’m writing this blog post on the desk at my new place — after spending the last week moving both my apartment and my office.  I drastically underestimated how much time that would take, which is why I’m making this post on Tuesday….

And further, later on in May, I had discussions about continuing my curriculum consulting into the fall.  On top of that, my friend Craig asked me to do data analysis for his company which manages a hedge fund.  So there seemed to be no shortage of work.

I didn’t think that I’d get to the end of a post so soon — there is still more to the story, which I’ll continue next week.  But I thought it was important to share a little about what was going on.  So many of my posts over the past three years revolved around the classroom/university experience, and I thought it would seem odd if I just stopped talking about these things.

Of course I still have a lot to say about any number of mathematical topics, and I may occasionally write about my Adventures in Consulting Land.  Given my past year, it is difficult to know exactly what the future will bring….

## Pythagorean Triples

I recently began writing some lectures for an online course — I’ll talk more about the nature of the course in next week’s post.  The broad topic is geometry, of course a favorite — and the specific topic for this unit is Triangles.

You can’t talk about triangles without talking about the Pythagorean Theorem.  Part of my job is also to compose problems for the lectures as well as for quizzes and exams, and to my surprise, I came up with a few interesting ones.  So I thought I’d share them with you.  I am always a fan of sharing mathematics as it happens!

The questions I wrote are based on the following parameterization of Pythagorean Triples:  Given positive integers $p$ and $q,$ then

$(q^2-p^2,2pq,q^2+p^2)$

is a Pythagorean Triple.  This parameterization generates all primitive Pythagorean Triples — that is, triples whose sides share no common factor.  But it is not possible to get $(9,12,15),$ for example, using this parameterization.  Of course $(9,12,15)$ is just three times the triple $(3,4,5);$ therefore, if you can generate all primitive Pythagorean Triples, you can take multiples of them to generate all Pythagorean Triples.

I thought of my first problem walking down the sidewalk going to lunch the other day.  The simplest Pythagorean Triple, $(3,4,5),$ has side lengths which are in arithmetic progression.  What other Pythagorean Triples have this property?

The simplest way to approach this is to parameterize such a triple by $(a,a+d,a+2d),$ where $a>0$ is the smallest integer in the arithmetic progression and $d>0$ is the common difference.  Since the triangle is a right triangle, we must have

$a^2+(a+d)^2=(a+2d)^2,$

which we may rewrite as

$a^2-2ad-3d^2=0.$

Now this factors:

$(a+d)(a-3d)=0,$

resulting in solutions $a=-d$ or $a=3d.$  We did assume that $d>0,$ so we eliminate the solution $a=-d.$  Note that this would generate the triple $(a,0,-a),$ and in fact $a^2+0^2=(-a)^2.$ But one side length is zero and another is negative, so no triangle is possible with these side lengths.

What about the solution $a=3d$?  Here, we get

$(a,a+d,a+2d)=(3d,4d,5d),$

which you can observe is just a multiple $d$ of the primitive Pythagorean Triple $(3,4,5).$

The conclusion?  The only Pythagorean Triples possible whose side lengths are in arithmetic progression are multiples of the $(3,4,5)$ right triangle.

I really didn’t know the answer would come out so nicely — but since the algebra involved was fairly straightforward, I thought I could include this as a non-routine example of an application of the Pythagorean Theorem at the high school level.

The previous problem was part of a lecture.  The next problem was written as a possible exam question for teachers; once I realized I had more than one interesting problem, I thought there would be enough for a blog post….

I was just looking for interesting patterns in Pythagorean Triples, and noticed that with the $(6,8,10)$ triangle, the area and perimeter were both $24.$  A coincidence?  Were there other triangles with this property?

Of course there had to be finitely many — as the side lengths get larger, the area gets larger faster than the perimeter, as the area is essentially a quadratic function, while the perimeter is essentially a linear function.  So how many others are there?  Make a mental note of your guess before reading further….

We begin by parameterizing by

$(k(q^2-p^2),2kpq,k(q^2+p^2));$

the factor of $k$ is necessary since the two-variable version generates all primitive Pythagorean Triples, but not necessarily all Pythagorean Triples.

Setting the perimeter and area equal to each other results in

$\dfrac12k(q^2-p^2)\cdot2kpq=k(q^2-p^2+2pq+q^2+p^2),$

Cancelling out factors of $k,$ $q,$ and $p+q$ results in

$kp(q-p)=2.$

This equation clearly has just three solutions, since one of the factors must be $2$ and the other two factors must be $1.$

None is particular difficult; let’s take them one at a time.  When $k=2,$ then $p=q-p=1,$ so that $q=2.$  Substituting back into the parameterization, we obtain the Pythagorean Triple $2(3,4,5),$ which is the triple $(6,8,10).$

When $p=2,$ then $k=q-p=1,$ so that $q=3.$ This generates a new Pythagorean Triple, $(5,12,13).$

Finally, when $q-p=2,$ then $k=p=1$ and $q=3,$ so that the Pythagorean Triple $(8,6,10)$ is generated.  Of course this is just a duplicate of the first solution.

Surprised that there was just one more solution?  I was!  It was such a nice, straightforward solution, that I couldn’t help but include it.

There was a third problem which I liked, but the algebra was a little too intense — there was a nice geometrical solution, but it required ideas learned later on in the course.  So here it is if you want a challenge:  suppose you are given two right triangles, and you know that their perimeters and areas are the same.  Prove that they are congruent.

I think you might enjoy solving this purely algebraically.  I did like it so much, though, that I included a simpler version in one of my lectures:  suppose you are given two right triangles, and you know that their hypotenuses are both of length $8$ and that their perimeters are equal.  Prove that the triangles are congruent.

To be honest, I never knew I’d find problem solving with the Pythagorean Theorem so interesting.  It’s nice to know that there is always more geometry to learn!  Even with something as apparently simple as the venerable Pythagorean Theorem….

## Calculus: Hyperbolic Trigonometry, IV

Of course, there is always more to say about hyperbolic trigonometry….  Next, we’ll look at what is usually called the logistic curve, which is the solution to the differential equation

$\dfrac{dP}{dt}=kP(C-P),\quad P(0)\ \text{given}.$

The logistic curve comes up in the usual chapter on differential equations, and is an example of population growth.  Without going into too many details (since the emphasis is on hyperbolic trigonometry), $k$ is a constant which influences how fast the population grows, and $C$ is called the carrying capacity of the environment.

Note that when $P$ is very small, $C-P\approx C,$ and so the population growth is almost exponential.  But when $P(t)$ gets very close to $C,$ then $dP/dT\approx0,$ and so population growth slows down.  And of course when $P(t)=C,$ growth stops — hence calling $C$ the carrying capacity of the environment.  It represents the largest population the environment can sustain.

Here is an example of such a curve where $C=500,$ $k=0.02,$ and $P(0)=50.$

Notice the S shape, obtained from a curve rapidly growing when the population is small. It happens that the population grows fastest at half the carrying capacity, and then growth slows to zero as the carrying capacity is reached.

Skipping the details (simple separation of variables), the solution to this differential equation is given by

$P(t)=\dfrac{C}{1+Ae^{-kCt}},\qquad A=\dfrac{C-P(0)}{P(0)}.$

I will digress for a moment, however, to mention partial fractions (as I step on my calculus soapbox).  I have mentioned elsewhere that incomprehensible chapter in calculus textbooks:  Techniques of Integration.  Pedagogically a disaster for so many reasons.

The first time I address partial fractions is when summing telescoping series, such as

$\displaystyle\sum_{n=1}^\infty\dfrac1{n(n+1)}.$

It really is necessary.  But I only go so far as to be able to sum such series.  (Note:  I do series as the middle third of Calculus II, rather than the end.  A colleague suggested that students are more tired near the end of the course, which is better for a more technique-oriented discussion of the solution to differential equations, which typically comes before series.)

You also need partial fractions to solve the differential equation for the logistic curve, which is when I revisit the topic.  After finding the logistic curve, we talk about partial fractions in more detail.  The point is that students see some motivation for the method of partial fractions — which they decidedly don’t in a chapter on techniques of integration.

OK, time to step off the soapbox and talk about hyperbolic trigonometry….  The punch line is that the logistic curve is actually a scaled and shifted hyperbolic tangent curve!  Of course it looks like a hyperbolic tangent, but let’s take a moment to see why.

We first use the definitions of $\sinh u$ and $\cosh u$ to write

$\tanh u=\dfrac{\sinh h}{\cosh u}=1-\dfrac2{1+e^{2u}}.$

This results in

$\dfrac2{1+e^{2u}}=1-\tanh u.$

You can see the form of the equation of the logistic curve starting to take shape.  Since the hyperbolic tangent has horizontal tangents at $y=-1$ and $y=1,$ we need to scale by a factor of $C/2$ so that the asymptotes of the logistic curve are $C$ units apart:

$\dfrac C{1+e^{2u}}=\dfrac{C}2\left(1-\tanh u\right).$

Note that this puts the horizontal asymptotes of the function at $y=0$ and $y=C.$

To take into account the initial population, we need a horizontal shift, since otherwise the initial population would be $C/2.$ We can accomplish this be replacing $\tanh u$ with $\tanh(u+\varphi):$

$\dfrac C{1+e^{2\varphi} e^{2u}}=\dfrac C2(1-\tanh(u+\varphi)).$

We’re almost done at this point:  we simply need

$e^{2\varphi}=A,\qquad 2u=-kCt.$

Solving and substituting back results in

$P(t)=\dfrac C2\left(1-\tanh\left(\dfrac{-kCt+\ln A}2\right)\right),$

which, since $\tanh$ is an odd function, becomes

$P(t)=\dfrac C2\left(1+\tanh\left(\dfrac{kCt-\ln A}2\right)\right).$

And there it is!  The logistic curve as a scaled, shifted hyperbolic tangent.

Now what does showing this accomplish?  I can’t give you a definite answer from the point of view of the students.  But for me, it is a way to tie two seemingly unrelated concepts — hyperbolic trigonometry and solution of differential equations by separation of variables — together in a way that is not entirely contrived (as so many calculus textbook problems are).

I would love to perform the following experiment:  work out the solution to the differential equation together as a guided discussion, and then prompt students to suggest functions this curve “looks like.”  Of course the $\arctan$ might be suggested, but how would we relate this to the exponential function?

Eventually we’d tease out the hyperbolic tangent, since this function actually does involve the exponential function.  Then I’d move into an inquiry-based lesson:  give the students the equation of a logistic curve, and have them work out the conversion to the hyperbolic tangent.

And as is typical in such an approach, I would put students into groups, and go around the classroom and nudge them along.  See what happens.

I say that yes, calculus students should be able to do this.  I recently sent an email about pedagogy in calculus which, among other things, addressed the question:  What do calculus students really need to know?

There is no room to adequately address that important question here, but in today’s context, I would say this:  I think it is more important for a student to be able to rewrite $P(t)$ as a hyperbolic tangent than it is for them to know how to sketch the graph of $P(t).$

Why?  Because it is trivial to graph functions, now.  Type the formula into Desmos.  But how to interpret the graph?  Rewrite it?  Analyze it?  Draw conclusions from it?  We need to focus on what is no longer necessary, and what is now indispensable.  To my knowledge, no one has successfully done this.

I think it is about time for that to change….

## Calculus: Hyperbolic Trigonometry, III

We continue where we left off on the last post about hyperbolic trigonometry.  Recall that we ended by finding an antiderivative for $\sec(x)$ using the hyperbolic trigonometric substitution $\sec(\theta)=\cosh(u).$  Today, we’ll look at this substitution in more depth.

The functional relationship between $\theta$ and $u$ is described by the gudermannian function, defined by

$\theta=\text{gd}\,u=2\arctan(e^u)-\dfrac\pi2.$

This is not at all obvious, so we’ll look at the derivation of this rather surprising-looking formula.  It’s the only formula I’m aware of which involves both the arctangent and the exponential function.  We remark (as we did in the last post) that we restrict $\theta$ to the interval $(-\pi/2,\pi/2)$ so that this relationship is in fact invertible.

We use a technique similar to that used to derive a formula for the inverse hyperbolic cosine.  First, write

$\sec\theta=\cosh u=\dfrac{e^u+e^{-u}}2,$

and then multiply through by $e^u$ to obtain the quadratic

$(e^u)^2-2\sec(\theta)e^u+1=0.$

$e^u=\sec\theta\pm\tan\theta.$

Which sign should we choose?  We note that $\theta$ and $u$ increase together, so that because $e^u$ is an increasing function of $u,$ then $\sec\theta\pm\tan\theta$ must be an increasing function of $\theta.$ It is not difficult to see that we must choose “plus,” so that $e^u=\sec\theta+\tan\theta,$ and consequently

$u=\ln(\sec\theta+\tan\theta).$

We remark that no absolute values are required here; this point was discussed in the previous post.

Now to solve for $\theta.$  The trick is to use a lesser-known trigonometric identity:

$\sec\theta+\tan\theta=\tan\left(\dfrac\pi4+\dfrac\theta2\right).$

There is such a nice geometrical proof of this identity, I can’t help but include it.  Start with the usual right triangle, and extend the segment of length $\tan\theta$ by $\sec\theta$ in order to form an isosceles triangle.  Thus,

$\tan(\theta+\alpha)=\sec\theta+\tan\theta.$

To find $\alpha,$ observe that $\beta$ is supplementary to both $2\alpha$ and $\pi/2-\theta,$ so that

$2\alpha=\dfrac\pi2-\theta,$

which easily implies

$\alpha=\dfrac\pi4-\dfrac\theta2.$

Therefore

$\theta+\alpha=\dfrac\pi4+\dfrac\theta2,$

which is precisely what we need to prove the identity.

Now we substitute back into the previous expression for $u,$ which results in

$u=\ln\tan\left(\dfrac\pi4+\dfrac\theta2\right).$

This may be solved for $\theta,$ giving

$\theta=\text{gd}\,u=2\arctan(e^u)-\dfrac\pi2.$

So let’s see how to use this to relate circular and hyperbolic trigonometric functions.  We have

$\sec(\text{gd}\,u)=\dfrac1{\cos(2\arctan(e^u)-\pi/2)},$

which after using the usual circular trigonometric identities, becomes

$\sec(\text{gd}\,u)=\dfrac{e^u+e^{-u}}2=\cosh u.$

It is also an easy exercise to see that

$\dfrac{d}{du}\,\text{gd}\,u=\text{sech}\, u.$

So revisiting the integral

$\displaystyle\int\sec\theta\,d\theta,$

we may alternatively make the substitution $\theta=\text{gd}\,u,$ giving

$\displaystyle\int\sec\theta\,d\theta=\int\cosh u\,(\text{sech}\, u\,du)=\int du,$

which is the same simple integral we saw in the previous post.

What about the other trigonometric functions?  Certainly we know that $\cos(\text{gd}\,u)=\text{sech}\,u.$  Again using the usual circular trigonometric identities, we can show that

$\sin(\text{gd}\,u)=\tanh u.$

Knowing these three relationships, the rest are easy to find: $\tan(\text{gd}\,u)=\sinh u,$ $\cot(\text{gd}\,u)=\text{csch}\,u,$ and $\csc(\text{gd}\,u)=\text{coth}\,u.$

I think that the gudermannian function should be more widely known.  On the face of it, circular and hyperbolic trigonometric functions are very different beasts — but they relate to each other in very interesting ways, in my opinion.

I will admit that I don’t teach students about the gudermannian function as part of a typical calculus course.  Again, there is the issue of time:  as you are well aware, students finishing one course in the calculus sequence must be adequately prepared for the next course in the sequence.

So what I do is this:  I put the exercises on the gudermannian function as extra challenge problems.  Then, if a student is already familiar with hyperbolic trigonometry, they can push a little further to learn about the gudermannian.

Not many students take on the challenge — but there are always one or two who will visit my office hours with questions.  Such a treat for a mathematics professor!  But I feel it is always necessary to give something to the very best students to chew on, so they’re not bored.  The gudermannian does the trick as far as hyperbolic trigonometry is concerned….

As a parting note, I’d like to leave you with a few more exercises which I include in my “challenge” question on the gudermannian.  I hope you enjoy working them out!

1.  Show that $\tanh\left(\dfrac x2\right)=\tan\left(\dfrac 12\text{gd}\,x\right).$
2. Show that $e^x=\dfrac{1+\tan(\frac12\text{gd}\,x)}{1-\tan(\frac12\text{gd}\,x)}.$
3. Show that if $h$ is the inverse of the gudermannian function, then $h'(x)=\sec x.$