I have been interested in this paticular problem:

Either there may be a general formula, or there's a systematic method.

I decided to begin by looking at smaller values of m, and hopefully I can find a pattern in the formula.

And so on...

I've found two systematic ways to calculate formulas for higher values of m. The first uses simple algebra, the second involves derivatives.

I'll be happy to share them later, but first I want to see if anyone got their own method that they would like to share. Please post below.