Minor notebook update

I started a new notebook last week and thought it worth writing another update on how I’m using it.

Current notebook

I’m still using Feela A5 notebooks because they hold up well and are cheap—as am I. I’m still using a Pentel Kerry mechanical pencil; that’s it tucked in the notebook’s loop. I’m still keeping my index of pages in an iCloud file called Notebook index.txt, and most of the index entries are still added through dictation via a Shortcut on my iPhone.

What’s new is that I’ve started keeping a to-do list in the notebook. I’m not busy enough to have a daily list, but a weekly list works well. Every Monday I write out two lists on a two-page spread: this week’s tasks on the left side and future tasks on the right:

Open notebook showing this week’s and later tasks

A few things I want to mention:

My notebook index file currently covers 8 notebooks and has over 500 entries. I got those numbers via egrep. The entries for each new book start with a line like

Book: 2023-06-12 to 2023-09-24

so I can count the number of books using

egrep -c '^Book:' 'Notebook index.txt'

Each entry line starts with the date in yyyy-mm-dd format, so they’re counted using

egrep -c '^\d{4}-\d\d-\d\d' 'Notebook index.txt'

I’ve been doing the one-notebook thing for about three years now. It’s one of the few productivity undertakings that I’ve stayed with for multiple years with no breaks.


Miscounting sheep

This morning, I checked the iPhone Health app to see how long I’ve been sleeping recently. I wanted to look at the past month but mistakenly tapped the 6M button instead of the M. This is what I saw:

Six-month sleep graph

Now, I certainly don’t sleep 9½ hours per night. Or 9½ hours per week, which I guess could be another interpretation, given that each column in this chart represents a week. I decided to look back at the graphs for each of the past six months to see what they said:

Sleep graphs for six individual months

All of these graphs make sense to me.

So what’s going on with the six-month graph? I thought I might find the answer by tapping on one of the weeks,

Six-month sleep graph with details of one week

and comparing it to that same week in the “W” tab,

One week of sleep in May

The weird bit of sleep around 6:00 pm (probably me falling asleep reading) is there in the both one-week graph and the six-month graph, so that makes sense. But there’s no sleeping much past 6:30 or 7:00 in the morning in the weekly graph, while the main body of the column extends past 10:00 am in the six-month graph. It’s just weird.

Normally, my posts are critical of graphs that make poor style choices or are otherwise bad at telling the story they’re meant to tell. But in this case, the data just look wrong. I don’t get it.


Beam deflections by the moment-area method

My last few posts have involved the solution of differential equations. Structural engineers tend to avoid using the solution techniques taught in math class, partly because we’re not that good at math and partly because people who were good at math figured out ways for us to get solutions with only some simple geometric calculations. One of those ways is the moment-area method for calculating beam deflections. It’s a way of solving differential equations without solving differential equations.

Here’s a beam with a distributed load.

Beam with positive directions

Under the beam, the thick black curve is the deflected shape of the beam’s centerline, and under that is a chunk of the beam showing the internal stress resultants; V is the shear force, and M is the bending moment. For the sign convention I’m using—which is the common convention used in structural engineering—everything is shown in the positive direction:

A few things to note:

These last three items are standard assumptions. You can relax the last two to allow for beams where E and I change along the length of the beam, but I won’t be dealing with that here.

A key relationship in the analysis of beams is that curvature and bending moment are proportional:

y=MEI

This is the differential equation that ChatGPT and Claude tried to solve in the posts I published last week.

A lot of a structural engineer’s education is spent learning how to draw moment diagrams—a plot of M as a function of x—quickly and accurately. This is because the stresses in a beam are determined primarily by the bending moment in the beam. And if you have the moment diagram, you also have the curvature diagram; you only need to flip the sign and divide by EI.

Curvature diagram

And it turns out there are some simple geometric calculations you can use to determine rotations and deflections from the curvature diagram. These calculations make up the two theorems of the moment-area method.

The first theorem is pretty simple. If we take the shaded area under the curvature curve between xA and xB, the result will be the difference in rotation between points A and B:

xAxBydx=θAθB

This is most useful if the rotation at A or B is zero, which you can often ensure by choosing one of the points carefully, but there are ways to combine it with other knowledge even when neither rotation is zero.

The second moment-area theorem is more complicated. Let’s start by looking at this integral:

xAxB(xBx)ydx

This is the moment of the shaded area about point B, and we can do some interesting things with it. First, we’ll split it into two parts:

xBxAxBydxxAxBxydx

The first of these integrals is straightforward:

xBxAxBydx=xB(θBθA)

For the second, we’ll use integration by parts with

u=xanddv=ydx

which means

du=dxandv=y

So

xAxBxydx=xy|xAxB+xAxBydx

which works out to

(xAθAxBθB)+(yByA)

Putting the two parts together, we get some cancelation and

xAxB(xBx)ydx=yByAθA(xBxA)

This form is more useful:

yB=yA+θA(xBxA)+xAxB(xBx)ydx

Looking back at our deflection drawing,

Beam deflection and tangent line

we see that the moment of the shaded area about B (that’s the integral) is the downward distance of point B from the tangent line drawn through point A.

This may seem like a mess, but it tends to be very easy to use in practice. Let’s use it to solve the cantilever beam problem that ChatGPT and Claude had trouble explaining.

Cantilever beam with concentrated load at center

The moment diagram is

Moment diagram for cantilever beam

We’ll put point A at the fixed end and B at the free end. That means yA=0 and θA=0. Therefore, the moment of the shaded area about point B (after flipping the sign and dividing by EI) will be the deflection at B. That works out to

(12PL2EIL2)(L2+23L2)=5PL348EI

which is the right answer. The reason this is so easy is that you know the area of a right triangle is one-half the product of the two legs and that its centroid is two-thirds of the way from the pointy end. Multiply the area (in the first pair of parentheses) by the distance its centroid is from point B (in the second pair of parentheses) and you’re done.

In practical problems, moment diagrams tend to be combinations of straight lines and parabolas, and once you know their areas and centroids, the moment-area calculations become second nature. A few years ago, I wrote a post with this diagram showing the areas and centroids of parabolic regions:

Parabola areas and centroids

At the end of that post, I said I felt compelled to write a followup on the moment-area method. Obviously, the compulsion wasn’t that strong, as it took me three years to do it. But here it is.


Odd analysis in an old book

In retirement, I’ve taken to going through old engineering textbooks to fill in holes that weren’t covered in my classes. These aren’t necessarily the assigned texts, but they’re books I heard about. Recently, I’ve started on Mathematical Methods in Engineering by Theodore von Kármán and Maurice Biot, published in 1940.

Early in the book, in a section about using separation of variables to solve ordinary differential equations, the authors derive the equation for a catenary in a way that seems a little odd to me. Here it is, where I’ve put together into a single image an analysis that’s spread over two pages in the book:


Catenary example from von Karman and Biot


The first thing you may have noticed is that the last two equations,

dydx=tanθ=12(ewxHewxH)

and

y=H2w(ewxH+ewxH)+C

don’t simplify their form by using hyperbolic trig functions. Most authors write these as

dydx=tanθ=12sinhwxH

and

y=H2wcoshwxH+C

I don’t understand why they went to the trouble of manipulating the integral into the difference of two exponentials if they weren’t going to then use the definition

eueu=sinhu

It’s not wrong, just odd.

Even stranger, I thought, was the expression for

0θdθcosθ

I’m not complaining about how they should have used a dummy variable instead of θ inside the integral (although they should have). No, what’s strange is the expression they used for the answer:

lntan(π4+θ2)

where I’m making it explicit that the logarithm is the natural log. Not only does the introduction of the π/4 term seem to complicate the expression unnecessarily, it leads to the use of this bizarre trig identity,

tan(π4+θ2)cot(π4+θ2)=2tanθ

to get the integral in the form they want.

Now it’s true that I haven’t memorized a lot of trig identities, but that’s one I’m sure I’ve never even seen before. And the thing is, there’s a simpler expression for the antiderivative of secθ:

ln(secθ+tanθ)

How is this simpler? Well, it’s obvious that

secθ+tanθ=1+sinθcosθ

so it’s fairly easy to show that

(secθ+tanθ)1=secθtanθ

as long as you remember that

(1+sinθ)(1sinθ)=1sin2θ=cos2θ

Therefore,

(secθ+tanθ)(secθtanθ)=2tanθ=ewxHewxH

which is where the authors want to go to get to Equation 3.11.

I now feel an obligation to look into books of similar or earlier vintage to see if von Kármán and Biot’s derivation technique was common back then.