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

Day146logistic.png

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.

This quadratic equation results in

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.

Day146Figure

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.

Bay Area Mathematical Artists, VIII

Yesterday was our final meeting of the Bay Area Mathematical Artists for the academic year 2017–2018.  We were back at Santa Clara University to visit their virtual reality lab, the Imaginarium!  It was an amazing visit, coordinated by Frank Farris, Tom Banchoff (who is visiting Santa Clara University this semester), and Imaginarium director Max Sims.

Day144IMAG9147
Sculpture outside the Imaginarium.

While we were waiting for everyone to arrive, Tom generously provided donuts for us to snack on.  But not until we were given a short presentation on a very special property of donuts — the “two-piece” property, which Tom discussed in his doctoral thesis.

A perfectly smooth donut — this is important, since bumps or ridges are problematic — has the property that if you take a knife and make a planar cut, you always get exactly two pieces.

Of course any convex shape automatically has this property.  Donuts, however, are not convex, so they are special in this regard.  Tom remarked that discussing this makes good breakfast conversation, since smooth bagels also have the two-piece property.  But a sufficiently curved banana does not (think of the letter U and make a horizontal cut to get three pieces).

Day144IMAG9148
A different view of the same sculpture.

Once everyone arrived, Tom began with a presentation of his forays into computer graphics and animations.  The first video he showed was made in 1968 with computer scientist Charles Strauss, also at Brown, which showed a torus turning inside out.

What was fascinating was how the video was made.  Keep in mind this was long before platforms like Processing were available….  Even though each frame was black-and-white and consisted of line drawings of a torus in various different configurations, it still took about a minute to create each frame.

Then, each frame had to be photographed — using film, if you remember what that is.  Then another minute, another photograph.  Next, the film was sent on to Boston, where it was processed into a movie.  The movie was sent back — and hopefully, it was just what you wanted….

Fast-forward to 1978, where the subject of the video was rotating cubes and hypercubes. I won’t try to describe it in words, but you can actually see the video online here.

It looks like the graphics in this movie were color graphics!  But no, that wasn’t available yet.  You see color because each frame used four photographs — each taken with a different filter on.  These were overlaid to create a color graphic.  Very creative, and again, certainly much more work than it would take today.  Keep in mind that 1978 was forty years ago….

There were still three movies to go!  Next, Tom showed us his 1985 movie about the hypersphere.  We then got to see Tom’s animation of donut slicing, which was the virtual version of our initial demonstration.  Finally, the last video was from 1999, which was a rotation of the flat torus.

The movies and talk took us halfway through the afternoon.  Now it was time to try on the headsets and have our very own virtual reality experience!

We learned from Max Sims a little about the technical challenges of creating a good VR experience.  First, 90 frames per second is ideal — contrast that with 30 frames per second when creating movies with a platform like Processing.  And second, the response time of the headsets needs to be no longer than 11 milliseconds — that is, when you turn your head to look at something, the image has to change that fast — or else you’ll get motion sickness.

Day144IMAG9139.jpg

The way the lab was set up, everyone got their own computer (although it took me three tries to find one which had everything working properly).  You can see people with headsets on and controls in their hands.

It is very hard to describe what it feels like with the headset on without experiencing it for yourself.  But when you put on the goggles, you’re in a 360-degree visual environment.  That is, when you turn your head to the right, you are seeing what’s to the right of your visual range in the VR simulation.  You can even look down and see what’s underneath you!  It was a little dizzying to look down and see a stream running underneath you, since that meant you were suspended in midair….

The hand controls were different for every experience.  Some allowed you to move things, or select different types of building blocks to make 3D images, or select a different simulation.  It took a bit of getting used to, and I didn’t fully get the hang of it in the hour we had to play around.  But Max said we were welcome back to try out the lab again, and I do intend to take him up on his offer.

After our incredible experience, we went out for Thai — sixteen of us, this time!  We spent over two hours at dinner, which is typical.  These gatherings bring together a diverse group of people interested in all aspects of mathematics and art, and it seems we never run out of things to talk about.

Then the drive home.  I was driving Nick, and we were amazed by the cloud formations we saw all along the way.  Despite my rather dirty windshield, Nick snapped this gorgeous pic.

Day14426146327151007

The clouds were like this for most of the drive home, and were a very fitting end to our last gathering of the semester.

Plans are underway to continue meeting throughout the summer, so stay tuned!

Calculus: Hyperbolic Trigonometry, II

Now on to some calculus involving hyperbolic trigonometry!  Today, we’ll look at trigonometric substitutions involving hyperbolic functions.

Let’s start with a typical example:

\displaystyle\int\sqrt{1+x^2}\,dx.

The usual technique involving circular trigonometric functions is to put x=\tan(\theta), so that dx=\sec^2(\theta)\,d\theta, and the integral transforms to

\displaystyle\int\sec^3(\theta)\,d\theta.

In general, we note that when taking square roots, a negative sign is sometimes needed if the limits of the integral demand it.

This integral requires integration by parts, and ultimately evaluating the integral

\displaystyle\int\sec(\theta)\,d\theta.

And how is this done?  I shudder when calculus textbooks write

\displaystyle\int \sec(\theta)\cdot\dfrac{\sec(\theta)+\tan(\theta)}{\sec(\theta)+\tan(\theta)}\,d\theta=\ldots

How does one motivate that “trick” to aspiring calculus students?  Of course the textbooks never do.

Now let’s see how to approach the original integral using a hyperbolic substitution.  We substitute x=\sinh(u), so that dx=\cosh(u)\,du and \sqrt{1+x^2}=\cosh(u).  Note well that taking the positive square root is always correct, since \cosh(u) is always positive!

This results in the integral

\displaystyle\int\cosh^2(u)\,du=\displaystyle\int\dfrac{1+\cosh(2u)}2\,du,

which is quite simple to evaluate:

\dfrac12u+\dfrac14\sinh(2u)+C.

Now u=\hbox{arcsinh}(x), and

\sinh(2u)=2\sinh(u)\cosh(u)=2x\sqrt{1+x^2}.

Recall from last week that we derived an explicit formula for \hbox{arcsinh}(x), and so our integral finally becomes

\dfrac12\left(\ln(x+\sqrt{1+x^2})+x\sqrt{1+x^2}\right)+C.

You likely noticed that using a hyperbolic substitution is no more complicated than using the circular substitution x=\sin(\theta).  What this means is — no need to ever integrate

\displaystyle\int\tan^m(\theta)\sec^n(\theta)\,d\theta

again!  Frankly, I no longer teach integrals involving \tan(\theta) and \sec(\theta) which involve integration by parts.  Simply put, it is not a good use of time.  I think it is far better to introduce students to hyperbolic trigonometric substitution.

Now let’s take a look at the integral

\displaystyle\int\sqrt{x^2-1}\,dx.

The usual technique?  Substitute x=\sec(\theta), and transform the integral into

\displaystyle\int\tan^2(\theta)\sec(\theta)\,d\theta.

Sigh.  Those irksome tangents and secants.  A messy integration by parts again.

But not so using x=\cosh(u).  We get dx=\sinh(u)\,du and \sqrt{x^2-1}=\sinh(u) (here, a negative square root may be necessary).

We rewrite as

\displaystyle\int\sinh^2(u)\,du=\displaystyle\int\dfrac{\cosh(2u)-1}2\,du.

This results in

\dfrac14\sinh(2u)-\dfrac u2+C=\dfrac12(\sinh(u)\cosh(u)-u)+C.

All we need now is a formula for \hbox{arccosh}(x), which may be found using the same technique we used last week for \hbox{arcsinh}(x):

\hbox{arccosh}(x)=\ln(x+\sqrt{x^2-1}).

Thus, our integral evaluates to

\dfrac12(x\sqrt{x^2-1}-\ln(x+\sqrt{x^2-1}))+C.

We remark that the integral

\displaystyle\int\sqrt{1-x^2}\,dx

is easily evaluated using the substitution x=\sin(\theta).  Thus, integrals of the forms \sqrt{1+x^2}, \sqrt{x^2-1}, and \sqrt{1-x^2} may be computed by using the substitutions x=\sinh(u), x=\cosh(u), and x=\sin(\theta), respectively.  It bears repeating:  no more integrals involving powers of tangents and secants!

One of the neatest applications of hyperbolic trigonometric substitution is using it to find

\displaystyle\int\sec(\theta)\,d\theta

without resorting to a completely unmotivated trick.  Yes, I saved the best for last….

So how do we proceed?  Let’s think by analogy.  Why did the substitution x=\sinh(u) work above?  For the same reason x=\tan(\theta) works: we can simplify \sqrt{1+x^2} using one of the following two identities:

1+\tan^2(\theta)=\sec^2(\theta)\ \hbox{  or  }\ 1+\sinh^2(u)=\cosh^2(u).

So \sinh(u) is playing the role of \tan(\theta), and \cosh(u) is playing the role of \sec(\theta).  What does that suggest?  Try using the substitution \sec(\theta)=\cosh(u)!

No, it’s not the first think you’d think of, but it makes sense.  Comparing the use of circular and hyperbolic trigonometric substitutions, the analogy is fairly straightforward, in my opinion.  There’s much more motivation here than in calculus textbooks.

So with \sec(\theta)=\cosh(u), we have

\sec(\theta)\tan(\theta)\,d\theta=\sinh(u)\,du.

But notice that \tan(\theta)=\sinh(u) — just look at the above identities and compare. We remark that if \theta is restricted to the interval (-\pi/2,\pi/2), then as a result of the asymptotic behavior, the substitution \sec(\theta)=\cosh(u) gives a bijection between the graphs of \sec(\theta) and \cosh(u), and between the graphs of \tan(\theta) and \sinh(u). In this case, the signs are always correct — \tan(\theta) and \sinh(u) always have the same sign.

So this means that

\sec(\theta)\,d\theta=du.

What could be simpler?

Thus, our integral becomes

\displaystyle\int\,du=u+C.

But

u=\hbox{arccosh}(\sec(\theta))=\ln(\sec(\theta)+\tan(\theta)).

Thus,

\displaystyle\int \sec(\theta)\,d\theta=\ln(\sec(\theta)+\tan(\theta))+C.

Voila!

We note that if \theta is restricted to the interval (-\pi/2,\pi/2) as discussed above,  then we always have \sec(\theta)+\tan(\theta)>0, so there is no need to put the argument of the logarithm in absolute values.

Well, I’ve done my best to convince you of the wonder of hyperbolic trigonometric substitutions!  If integrating \sec(\theta) didn’t do it, well, that’s the best I’ve got.

The next installment of hyperbolic trigonometry?  The Gudermannian function!  What’s that, you ask?  You’ll have to wait until next time — or I suppose you can just google it….

Calculus: Hyperbolic Trigonometry, I

love hyperbolic trigonometry.  I always include it when I teach calculus, as I think it is important for students to see.  Why?

  1.  Many applications in the sciences use hyperbolic trigonometry; for example, the use of Laplace transforms in solving differential equations, various applications in physics, modeling population growth (the logistic model is a hyperbolic tangent curve);
  2. Hyperbolic trigonometric substitutions are, in many instances, easier than circular trigonometric substitutions, especially when a substitution involving \tan(x) or \sec(x) is involved;
  3. Students get to see another form of trigonometry, and compare the new form with the old;
  4. Hyperbolic trigonometry is fun.

OK, maybe that last reason is a bit of hyperbole (though not for me).

Not everyone thinks this way.  I once had a colleague who told me she did not teach hyperbolic trigonometry because it wasn’t on the AP exam.  What do you say to someone who says that?  I dunno….

In any case, I want to introduce the subject here for you, and show you some interesting aspects of hyperbolic trigonometry.  I’m going to stray from my habit of not discussing things you can find anywhere online, since in order to get to the better stuff, you need to know the basics.  I’ll move fairly quickly through the introductory concepts, though.

The hyperbolic cosine and sine are defined by

\cosh(x)=\dfrac{e^x+e^{-x}}2,\quad\sinh(x)=\dfrac{e^x-e^{-x}}2,\quad x\in\mathbb{R}.

I will admit that when I introduce this definition, I don’t have an accessible, simple motivation for doing so.  I usually say we’ll learn a lot more as we work with these definitions, so if anyone has a good idea in this regard, I’d be interested to hear it.

The graphs of these curves are shown below.

Day142Hyp1

The graph of \cosh(x) is shown in blue, and the graph of \sinh(x) is shown in red.  The dashed orange graph is y=e^{x}/2, which is easily seen to be asymptotic to both graphs.

Parallels to the circular trigonometric functions are already apparent:  y=\cosh(x) is an even function, just like y=\cos(x).  Similarly, \sinh(x) is odd, just like \sin(x).

Another parallel which is only slight less apparent is the fundamental relationship

\cosh^2(x)-\sinh^2(x)=1.

Thus, (\cosh(x),\sinh(x)) lies on a unit hyperbola, much like (\cos(x),\sin(x)) lies on a unit circle.

While there isn’t a simple parallel with circular trigonometry, there is an interesting way to characterize \cosh(x) and \sinh(x).  Recall that given any function f(x), we may define

E(x)=\dfrac{f(x)+f(-x)}2,\quad O(x)=\dfrac{f(x)-f(-x)}2

to be the even and odd parts of f(x), respectively.  So we might simply say that \cosh(x) and \sinh(x) are the even and odd parts of e^x, respectively.

There are also many properties of the hyperbolic trigonometric functions which are reminiscent of their circular counterparts.  For example, we have

\sinh(2x)=2\sinh(x)\cosh(x)

and

\sinh(x+y)=\sinh(x)\cosh(y)+\sinh(y)\cosh(x).

None of these are especially difficult to prove using the definitions.  It turns out that while there are many similarities, there are subtle differences.  For example,

\cosh(x+y)=\cosh(x)\cosh(y)+\sinh(x)\sinh(y).

That is, while some circular trigonometric formulas become hyperbolic just by changing \cos(x) to \cosh(x) and \sin(x) to \sinh(x), sometimes changes of sign are necessary.

These changes of sign from circular formulas are typical when working with hyperbolic trigonometry.  One particularly interesting place the change of sign arises is when considering differential equations, although given that I’m bringing hyperbolic trigonometry into a calculus class, I don’t emphasize this relationship.  But recall that \cos(x) is the unique solution to the differential equation

y''+y=0,\quad y(0)=1,\quad y'(0)=0.

Similarly, we see that \cosh(x) is the unique solution to the differential equation

y''-y=0,\quad y(0)=1,\quad y'(0)=0.

Again, the parallel is striking, and the difference subtle.

Of course it is straightforward to see from the definitions that (\cosh(x))'=\sinh(x) and (\sinh(x))'=\cosh(x).  Gone are the days of remembering signs when differentiating and integrating trigonometric functions!  This is one feature of hyperbolic trigonometric functions which students always appreciate….

Another nice feature is how well-behaved the hyperbolic tangent is (as opposed to needing to consider vertical asymptotes in the case of \tan(x)).  Below is the graph of y=\tanh(x)=\sinh(x)/\cosh(x).

Day142Hyp2

The horizontal asymptotes are easily calculated from the definitions.  This looks suspiciously like the curves obtained when modeling logistic growth in populations; that is, finding solutions to

\dfrac{dP}{dt}=kP(C-P).

In fact, these logistic curves are hyperbolic tangents, which we will address in more detail in a later post.

One of the most interesting things about hyperbolic trigonometric functions is that their inverses have closed formulas — in striking contrast to their circular counterparts.  I usually have students work this out, either in class or as homework; the derivation is quite nice, so I’ll outline it here.

So let’s consider solving the equation x=\sinh(y) for y.  Begin with the definition:

x=\dfrac{e^y-e^{-y}}2.

The critical observation is that this is actually a quadratic in e^y:

(e^y)^2-2xe^y-1=0.

All that is necessary is to solve this quadratic equation to yield

e^y=x\pm\sqrt{1+x^2},

and note that x-\sqrt{1+x^2} is always negative, so that we must choose the positive sign.  Thus,

y=\hbox{arcsinh}(x)=\ln(x+\sqrt{1+x^2}).

And this is just the beginning!  At this stage, I also offer more thought-provoking questions like, “Which is larger, \cosh(\ln(42)) or \ln(\cosh(42))?  These get students working with the definitions and thinking about asymptotic behavior.

Next week, I’ll go into more depth about the calculus of hyperbolic trigonometric functions.  Stay tuned!

Calculus: The Geometry of Polynomials, II

The original post on The Geometry of Polynomials generated rather more interest that usual.  One reader, William Meisel, commented that he wondered if something similar worked for curves like the Folium of Descartes, given by the equation

x^3+y^3=3xy,

and whose graph looks like:

Day141Folium1

I replied that yes, I had success, and what I found out would make a nice follow-up post rather than just a reply to his comment.  So let’s go!

Just a brief refresher:  if, for example, we wanted to describe the behavior of y=2(x-4)(x-1)^2 where it crosses the x-axis at x=1, we simply retain the (x-1)^2 term and substitute the root x=1 into the other terms, getting

y=2(1-4)(x-1)^2=-6(x-1)^2

as the best-fitting parabola at x=1.

Now consider another way to think about this:

\displaystyle\lim_{x\to1}\dfrac y{(x-1)^2}=-6.

For examples like the polynomial above, this limit is always trivial, and is essentially a simple substitution.

What happens when we try to evaluate a similar limit with the Folium of Descartes?  It seems that a good approximation to this curve at x=0 (the U-shaped piece, since the sideways U-shaped piece involves writing x as a function of y) is y=x^2/3, as shown below.

Day141Folium2

To see this, we need to find

\displaystyle\lim_{x\to0}\dfrac y{x^2}.

After a little trial and error, I found it was simplest to use the substitution z=y/x^2, and so rewrite the equation for the Folium of Descartes by using the substitution y=x^2z, which results in

1+x^3z^3=3z.

Now it is easy to see that as x\to0, we have z\to1/3, giving us a good quadratic approximation at the origin.

Success!  So I thought I’d try some more examples, and see how they worked out.  I first just changed the exponent of x, looking at the curve

x^n+y^3=3xy,

shown below when n=6.

Day141Folium3.png

What would be a best approximation near the origin?  You can almost eyeball a fifth-degree approximation here, but let’s assume we don’t know the appropriate power and make the substitution y=x^kz, with k yet to be determined. This results in

x^{3k-n}z^3+1=3zx^{k+1-n}.

Now observe that when k=n-1, we have

x^{2n-3}z^3+1=3z,

so that \displaystyle\lim_{x\to0}z=1/3. Thus, in our case with n=6, we see that y=x^5/3 is a good approximation to the curve near the origin.  The graph below shows just how good an approximation it is.

Day141Folium4.png

OK, I thought to myself, maybe I just got lucky.  Maybe introduce a change which will really alter the nature of the curve, such as

x^3+y^3=3xy+1,

whose graph is shown below.

Day141Folium5

Here, the curve passes through the x-axis at x=1, with what appears to be a linear pass-through.  This suggests, given our previous work, the substitution y=(x-1)z, which results in

x^3+(x-1)^3z^3=3x(x-1)z+1.

We don’t have much luck with \displaystyle\lim_{x\to1}z here.  But if we move the 1 to the other side and factor, we get

(x-1)(x^2+x+1)+(x-1)^3z^3=3x(x-1)z.

Nice!  Just divide through by x-1 to obtain

x^2+x+1+(x-1)^2z=3xz.

Now a simple calculation reveals that \displaystyle\lim_{x\to1}z=1. And sure enough, the line y=x-1 does the trick:

Day141Folium6

Then I decided to change the exponent again by considering

x^n+y^3=3xy+1.

Here is the graph of the curve when n=6:

Day141Folium7

It seems we have two roots this time, with linear pass-throughs.  Let’s try the same idea again, making the substitution y=(x-1)z, moving the 1 over, factoring, and dividing through by x-1.  This results in

x^{n-1}+x^{n-2}+\cdots+1+(x-1)^2z^3=3xz.

It is not difficult to calculate that \displaystyle\lim_{x\to1}z=n/3.

Now things become a bit more interesting when n is even, since there is always a root at x=-1 in this case.  Here, we make the substitution y=(x+1)z, move the 1 over, and divide by x+1, resulting in

\dfrac{x^n-1}{x+1}+(x+1)^2z^3=3xz.

But since n is even, then x^2-1 is a factor of x^n-1, so we have

(x-1)(x^{n-2}+x^{n-4}+\cdots+x^2+1)+(x+1)^2z^3=3xz.

Substituting x=-1 in this equation gives

-2\left(\dfrac n2\right)=3(-1)z,

which immediately gives  \displaystyle\lim_{x\to1}z=n/3 as well!  This is a curious coincidence, for which I have no nice geometrical explanation.  The case when n=6 is illustrated below.

Day141Folium8

This is where I stopped — but I was truly surprised that everything I tried actually worked.  I did a cursory online search for Taylor series of implicitly defined functions, but this seems to be much less popular than series for y=f(x).

Anyone more familiar with this topic care to chime in?  I really enjoyed this brief exploration, and I’m grateful that William Meisel asked his question about the Folium of Descartes.  These are certainly instances of a larger phenomenon, but I feel the statement and proof of any theorem will be somewhat more complicated than the analogous results for explicitly defined functions.

And if you find some neat examples, post a comment!  I’d enjoy writing another follow-up post if there is continued interested in this topic.

Bay Area Mathematical Artists, VII

We had yet another amazing meeting of the Bay Area Mathematical Artists yesterday!  Just two speakers — but even so, we went a half-hour over our usual 5:00 ending time.

Our first presenter was Stan Isaacs.  There was no real title to his presentation, but he brought another set of puzzles from his vast collection to share.  He was highlighting puzzles created by Wayne Daniel.

Below you’ll see one of the puzzles disassembled.  The craftsmanship is simply remarkable.

Day140Stan1

If you look carefully, you’ll see what’s going on.  The outer pieces make an icosahedron, and when you take those off, a dodecahedron, then a cube…a wooden puzzle of nested Platonic solids!  The pieces all fit together so perfectly.  Stan is looking forward to an exhibition of Wayne’s work at the International Puzzle Party in San Diego later on this year.  For more information, contact Stan at stan@isaacs.com.

Day140Stan2

Our second speaker was Scott Kim (www.scottkim.com), who’s presentation was entitled Motley Dissections.  What is a motley dissection?  The most famous example is the problem of the squared square — that is, dissecting a square with an integer side length into smaller squares with integer side lengths, but with all the squares different sizes.

One property of such a dissection is that no two edges of squares meet exactly corner to corner.  In other words, edges always overlap in some way.

But there are of course many other motley dissections.  For example, below you see a motley dissection of one rectangle into five, one pentagon into eleven, and finally, one hexagon into a triangle, square, pentagon and hexagon.

Day140SK1Look carefully, and you’ll see that no single edge in any of these dissections exactly matches any other.  For these decompositions, Scott has proved they are minimal — so, for example, there is no motley dissection of one pentagon to ten or fewer.  The proofs are not exactly elegant, but they serve their purpose.  He also mentioned that he credits Donald Knuth with the term motley dissection, who used the term in a phone conversation not all that long ago.

Can you cube the cube?  That is, can you take a cube and subdivide it into cubes which are all different?  Scott showed us a simple proof that you can’t.  But, it turns out, you can box the box.  In other words, if the length, width, and height of the larger box and all the smaller boxes may be different, then it is possible to box the box.

Next week, Scott is off to the Gathering 4 Gardner in Atlanta, and will be giving his talk on Motley Dissections there.  He planned an activity where participants actually build a boxed box — and we were his test audience!

Day140Box1.jpg

He created some very elaborate transparencies with detailed instructions for cutting out and assembling.  There were a very few suggestions for improvement, and Scott was happy to know about them — after all, it is rare that something works out perfectly the first time.  So now, his success at G4G in Atlanta is assured….

We were so into creating these boxed boxes, that we happily stayed until 5:30 until we had two boxes completed.

Day140Box2.jpg

I should mention that Scott also discussed something he terms pseudo-duals in two, three, and even four dimensions!  There isn’t room to go into those now, but you can contact him through his website for more information.

As usual, we went out to dinner afterwards — and we gravitated towards our favorite Thai place again.  The dinner conversation was truly exceptional this evening, revolving around an animated conversation between Scott Kim and magician Mark Mitton (www.markmitton.com).

The conversation was concerned with the way we perceive mathematics here in the U.S., and how that influences the educational system.  Simply put, there is a lot to be desired.

One example Scott and Mark mentioned was the National Mathematics Festival (http://www.nationalmathfestival.org).  Tens of thousands of kids and parents have fun doing mathematics.  Then the next week, they go back to their schools and keep learning math the same — usually, unfortunately, boring — way it’s always been learned.

So why does the National Mathematics Festival have to be a one-off event?  It doesn’t!  Scott is actively engaged in a program he’s created where he goes into an elementary school at lunchtime one day a week and let’s kids play with math games and puzzles.

Why this model?  Teachers need no extra prep time, kids don’t need to stay after school, and so everyone can participate with very little needed as far as additional resources are concerned.  He’s hoping to create a package that he can export to any school anywhere where with minimal effort, so that children can be exposed to the joy of mathematics on a regular basis.

Mark was interested in Scott’s model:  consider your Needs (improving the perception of mathematics), be aware of the Forces at play (unenlightened administrators, for example, and many other subtle forces at work, as Mark explained), and then decide upon Actions to take to move the Work (applied, pure, and recreational mathematics) forward.

The bottom line:  we all know about this problem of attitudes toward mathematics and mathematics education, but no one really knows what to do about it.  For Scott, it’s just another puzzle to solve.  There are solutions.  And he is going to find one.

We talked for over two hours about these ideas, and everyone chimed in at one time or another.  Yes, my summary is very brief, I know, but I hope you get the idea of the type of conversation we had.

Stay tuned, since we are planning an upcoming meeting where we focus on Scott’s model and work towards a solution.  Another theme throughout the conversation was that mathematics is not an activity done in isolation — it is a communal activity.  So the Needs will not be addressed by a single individual, rather a group, and likely involving many members of many diverse communities.

A solution is out there.  It will take a lot of grit to find it.  But mathematicians have got grit in spades.