# An Involved Integral Series Calculation, pt. 1

I think a better name for the M and P summations I’ve been talking about would be integral series and differential series, in the same sense as geometric series, or any other kind.

I have been working on the calculations for the Integral Series of f(x)=log(x) over the past few weeks and it has been rather involved, but also interesting. I didn’t think I was going to find an explicit formula for the summation, but eventually I found a connection that I want to talk about here with generating functions.
It makes sense to talk about generating functions because they also have a lot of connections with derivatives and integrals. The Integral Series for log(x) leads to what turns out to be an exponential generating function, which is a sum of the form:
$\sum a_n \frac {x^n}{n!}$
But let me start at the beginning with the iterated integrals of log(x) themselves. Even figuring out what pattern the integrals have in the arbitrary case was pretty tricky.
When trying to figure out the integral of log(x), there is no simple rule to figure it out. You have to reason backwards from the derivative of log(x).
$\frac{D(log(x))}{dx} = \frac{1}{x}$ by definition of the logarithm.
This definition is interesting when you combine it with the product rule:
$\frac{D(x * log(x)}{dx} = x * \frac{1}{x} + 1 * log(x) = 1 + log(x)$
The derivative of x log(x) is very close to log(x), because the 1 / x and the x cancel in the left hand of the product rule, and the x when differentiated becomes 1 on the right side. From this derivative we can get the integral of log(x):
$f'(x * log(x)) = 1 + log(x)$
$f'(x * log(x)) - 1 = log(x)$
Using the fact that the derivative of a sum is the sum of the derivatives, and taking the integral of 1 wrt x, we can turn that into:
$f'(x * log(x) - x) = log(x)$
$x * log(x) - x = \int{log(x) dx}$
Then taking the 2nd integral, we have the first term which we will have to figure out, but the second term is just x, so that part is easy:
$\int \int{log(x) dx} = \int{x log(x) dx} - \frac{x^2}{2}$
The integral of x log(x) is not that different from log(x) itself:
$\frac{D(x^2 * log(x))}{dx} = x^2 * \frac{1}{x} + 2 x * log(x) = x + 2 x * log(x)$
$\int {x * log(x) dx} = \frac{1}{2} x^2 * log(x) - \frac{1}{4} x^2$
The clear pattern is all of the parts of the expression have the same power of x.
Generalizing:
$\int{x^{n} * log(x)} = \frac{1}{n+1} * x^{n+1} * log(x) - \frac{1}{(n+1)^2} x^{n+1}$
Applying this rule we will have an extra polynomial term with each integration of log(x), as well as the integrals of the previous polynomial terms:
Using the notation:  L(n) to denote the nth integral of log(x), here are a few of them.
$L(0) = log(x)$
$L(1) = x * log(x) - x$
$L(2) = \frac{1}{2} x^2 * log(x) - \frac{1}{2*2} x^2 - \frac{1}{2} x^2$
$L(3) = \frac{1}{2*3} x^3 * log(x) - \frac{1}{2*3*3} x^3 - \frac{1}{2*2*3} x^3 - \frac{1}{2*3} x^3$
Grouping the fractions in L(3) hints towards the pattern for L(n):
$L(3) = \frac{1}{1*2*3} x^3 * log(x) - \frac{1}{1*2*3} * (\frac{1}{3} + \frac{1}{2} + \frac{1}{1})$
The more terms you take the more messy it gets but the pattern in L(3) holds:
$L(n) = \frac{1}{n!} x^n * log(x) - x^n \frac{1}{n!} * \sum_{k=1}^{n} \frac{1}{k}$
Or:
$L(n) = \frac{x^n}{n!} (log(x) + H_n)$
The $H_n$ is called the nth harmonic number. It is simply the sum of the reciprocals of the first n integers.
So the Integral Series is:
$\sum_{n} \frac{x^n}{n!} (log(x) + H_n)$
So we have something to work with, but the fact that the sum has these Harmonic numbers in it makes things more complicated. In order simplify things, I broke apart the summation above into s1 and s2. You can’t always break up an infinite sum because the converge could be different, but it seems to have worked out this time.
$H(log(x)) = s1 + s2$
$s1 = \sum_{n} \frac{x^n * log(x)}{n!}$
$s2 = \sum_{n} \frac{H_n * x^n}{n!}$
So I just distributed out log(x) and H and separated the sum that way.
For s1, log(x) doesn’t depend on the summation variable n, so we can separate it as we would in an integral.
$s1 = \sum_{n} \frac{x^n * log(x)}{n!} = log(x) \sum_{n} \frac{x^n}{n!}$
But then the sum itself is simply e^x.
$s1 = log(x) * e^x$
I’ll be discussing the calculations for s2 next time. I went through a lot of deadends when analyzing s2, but the final solution isn’t too bad.