Formula Building

Python implementation available on the Code page.

The algorithm to go from a known power summation formula to one of the next higher power is simple and follows one of two paths depending on the initial power being even or odd.

Initial Even Power

Having previously derived the summation formulas for the squares and cubes let us start here with the formula for the squares and derive the formula for the cubes. When starting with the formula for an even power we only need to compute the indefinite integral or antiderivative of the starting formula and then multiply the result by the number of the power we are trying to get to.

\sum_{i=1}^{n}i^2= \frac{n^3+3n^2+2n}{6}

\sum_{i=1}^{n}i^3= 3 \int [\frac{n^3+3n^2+2n}{6}] dn= \frac{n^4+2n^3+n^2}{4}

Initial Odd Power

If we follow the steps from above we will get a formula that is almost correct but will need one addition before it is the proper formula.

\sum_{i=1}^{n}i^3= \frac{n^4+2n^3+n^2}{4}

\sum_{i=1}^{n}i^4\approx 4 \int [\frac{n^4+2n^3+n^2}{4}] dn= \frac{6n^5+15n^4+10n^3}{30}

Plugging 1 into the new almost formula we get a value of \frac{31}{30} instead of 1. That means for every value of n we are off by \frac{1}{30} To correct for this we make the following change.

\sum_{i=1}^{n}i^4=  \frac{6n^5+15n^4+10n^3}{30} - n \frac{1}{30} = \frac{6n^5+15n^4+10n^3-n}{30}

Thus arriving at the proper formula for the summation of the fourth powers.


Leave a comment