# An Involved Integral Series Calculation, Part 2

From the first post we know that the integral series for log(x) is f(x) = s1(x) + s2(x). And:

$s1(x) = log(x) * e^x$
$s2 = \sum_{k} H_n * \frac{x^n}{n!}$

s2 has the pattern of an exponential generating function because $\frac{x^n}{n!}$ part. The harmonic series is then the series that is generating our result. If we expand s2 by each power of x we can see what the harmonic series looks like in a generating function.

$s2 = 0 * \frac{x^0}{0!} + \frac{1}{1} * \frac{x^1}{1!} + (\frac{1}{1}+\frac{1}{2}) * \frac{x^2}{2!}$

A nice part of exponential generating functions is that taking the gf’s derivative just slides down the coefficient to one lower power.

$s2' = \frac{1}{1} * \frac{x^0}{0!} + (\frac{1}{1} + \frac{1}{2}) \frac{x^1}{1!}$

Each term of s2′ has one more reciprocal being summed than the same term in s2 itself. s2 for x^1 has 1/1, but s2′ has 1/1 + 1/2. For each term, the difference between s2′ – s2 is $[x^n] \frac{1}{n+1}$

So, replacing s2 with f to make differential equations easier, we have:

$f'(x) - f(x) = \sum_k \frac{1}{k+1} \frac{x^k}{k!}$

This is a pretty interesting and not immediately obvious sum. But:

$e^x = \sum_k \frac{x^k}{k!}$
$\frac{e^x - 1}{x} = \sum_k \frac{x^(k-1)}{k!}$
$\frac{e^x - 1}{x} = \sum_k \frac{1}{k} \frac{x^(k-1)}{(k-1)!}$

Which is just f’ – f with k shifted forward. Since we can’t use k = 0 anyway, we can make this shift to make the sum actually valid starting from 0. Which means:

$\sum_k \frac{1}{k+1} \frac{x^k}{k!} = \frac{e^x - 1}{x}$
$f'(x) - f(x) = \frac{e^x - 1}{x}$

$y'(x) + f(x) * y(x) = g(x)$
$g(x) = \frac{e^x - 1}{x}$

$f(x) = -1$
$\int 1 dx = x$
$y(x) = \frac{\int \frac{e^(2x) - e^x}{x}}{e^x}$

This integral does not have an elementary solution, but according to Wolfram Alpha it is Ei(2x) – Ei(x) where Ei is the Exponential Integral special function.

$s2 = \frac{Ei(2x) - Ei(x)}{e^x}$
$s1 = log(x) * e^x$

So the final answer is not clean or neat but there it is.