Archive for July, 2024

On the N Days Of Christmas, part 7

July 28, 2024

What a long, strange trip it’s been.

(Grateful Dead)

In this final post, I explore a curious (at least from my perspective), yet tenuous, relationship between triangular numbers and the polynomial model, from parts 4 and 5 respectively, via a brief detour through Calculus.

As a reminder, the function to compute the Nth triangular number from part 4 is shown below along with the sum of the applications of this function to the values (day number) 1 to 12:

The function to compute the number of gifts for the Nth day of Christmas from part 5 is:

and as we saw in the last post, applying this function to 12 also gives 364:

If we take the indefinite integral of the triangular numbers function, the result is as follows:

The first term of the resulting integral is the same as the polynomial.

The coefficients of the second terms differ (one half vs one quarter) between the polynomial model and the integral of the triangular numbers formula.

Ignoring the constant of integration, C (see below), this gives:

which is 40 short of what all our methods give for the number of gifts for the 12 days of Christmas. Since we are interested in the range of days from 1 to 12, the result of applying this formula to 1 should be subtracted, giving f(12) – f(1) = 324 – 0.41666 = 323.58333.

A more intuitive way to understand and compute the integral of this function is via a numerical method called the Riemann Sum, in which rectangles are used to approximate the area under the curve (which is what the integral means here):

As the number of rectangles increases and their width decreases, the Riemann Sum result becomes closer to the Actual Sum. Making a = 0 instead adds nothing since f(0) here gives 0.

Geogebra was used to create the Riemann Sum graphic above in which the actual area computed by the so-called definite integral is also shown. The definite integral, F, for the 12 days of Christmas does allow us to ignore C, owing to the fact that subtracting the application F to 1 from the application of F to 12 cancels C out :

As you can see, this result is the same as the Actual Area shown in the Geogebra graphic above.

So, my intuition that integrating the triangular numbers equation would give the same result as the days-of-xmas equation, and the polynomial equation in particular, turned out to be wrong. But, there’s a simple reason for that. The derivative (opposite of the integral) of the polynomial equation is not the triangular numbers equation! It is this instead:

If we apply the Riemann Sum to this, we should get the expected result:

Note that the final term (one third) does make a contribution here since f(0) is non-zero.

So ends the long strange trip down the rabbit hole this series has taken me on.

Or does it?

I’ve spent far too much time thinking about this, but it’s been a lot of fun!

Or have I?

Definitely mathematics of the recreational kind anyway!

Health issues in 2024

July 20, 2024

red white and yellow medication pills
Photo by Anna Shvets on Pexels.com

This year honestly hasn’t been the best for me health-wise. The up side was that I had to change GPs (the old one retired) and I found a good one.

Not long after 2024 started, an upper respiratory infection turned into bronchitis, and I ended up on a few rounds of antibiotics, ventolin, and steroids. Lucky it wasn’t worse.

That was followed by sinusitis and eustaschian tube dysfunction making me very cautious about flying, even taking a day long interstate train trip once instead. The last time I flew I used pressure change regulating earplugs. I still can’t clear my ears properly.

A couple of months ago I tripped on uneven paving and fell while walking to the bus interchange, a 12 minute walk from our house on a dark, wet night. I was holding an umbrella at the time and the handle impacted my ribs as I hit the ground. A fair amount of pain and anti-inflammatories for that. That’s mostly better and I’m lucky it didn’t do more damage (close to liver, my GP said).

A few weeks ago a crown-with-post fell out while I was eating. It had last been re-cemented 25 years ago, first having been implanted several years before, after root canal therapy. It could not be re-cemented this time because what was left of the root had cracked. So now I need to get the root remnant removed and an implant put in. That is not likely to be either fun or cheap.

A little over a week ago I had liquid nitrogen applied to my scalp to freeze off a seborrheic keratosis as I have had done many times in the past, then a few days later, “minor surgery” to cut out another one. The last time (different doctor, a dermatologist) I had this done, the after-care was straightforward (and explained) and the scarring was minimal.

I’m really not concerned about the biopsy result at this point, but based upon what I saw after changing the dressing a couple of days ago, I have very real concerns about how long it will take to heal, how well it will do so, and what the guy who did it (same clinic as my GP — recommended by him, so thought I’d “give him a try”) says he wants to do next.

I’m just melancholy due to being reminded of my mortality too much already this year. Even though I try to pay attention to health, problems arise when you least expect them.

It’s self-indulgent, but right now, I’m starting to feel that the future is closing in on me a bit.

But then, it helps somewhat to compare one’s situation to people in war zones like Ukraine, Gaza and Rafah, or to anyone with a life-threatening illness or injury, or to those we care about who “left the party” too soon.

EDIT: As it turns out, I should have been more concerned about my biopsy report. It was squamous cell carcinoma. My doctor appears to have removed it all according to the report. The wound has started to heal much better in the last 3 days as well. I am thankful and relieved, and I should express that more clearly to the doctor who noticed the somewhat unremarkable skin lesion and carried out the minor surgery, despite my skepticism about healing. In the end, I’m glad I “gave him a try”.