## 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….