This question is closely related to An integral involving a Gaussian and a logarithm. .
Let $ \sigma >0 $, $ A >0 $ and $\lambda >0 $. Consider the following integral:
\begin{equation} {\mathcal I}(\lambda,A,\sigma) := \int\limits_{-\infty}^\infty \log\left[ 1+ \lambda \cdot (A \cdot e^{\sigma \xi} - 1)\right] \cdot \frac{\exp(-\xi^2/2)}{\sqrt{2\pi}} d\xi \end{equation}
In mathematical finance, this integral represents the expected value of the logarithm of wealth in a portfolio with a percentage $\lambda$ being invested in a risky asset with expected return $\log(A)$ and volatility $\sigma$ and a percentage $(1-\lambda)$ being invested in a risk-free asset that earns an interest rate equal to zero. Now, by rearranging the terms in the logarithm and then expanding the logarithm in a series , integrating term by term and then regularizing the result we have obtained a following closed form for the integral in question:
\begin{eqnarray} {\mathcal I}(\lambda,A,\sigma) = \log(1-\lambda + \lambda A) + \sum\limits_{p=1}^\infty \frac{(\sigma^2/2)^p}{p!} \cdot \left. \left(A \cdot \sum\limits_{k=1}^{2p-1} \{ \begin{array}{c} 2p-1 \\ k \end{array} \} \frac{(-1)^{k-1} k!}{(1+A)^{k+1}}\right)\right|_{A= A \cdot \frac{\lambda}{1-\lambda}} \tag{ii}\label{ii} \end{eqnarray}
Despite appearances the sum in the right hand side of \eqref{ii} converges quite fast as I have checked numerically below. There, I randomly sample some typical model parameters and then firstly compute the integral from the definition and secondly from the closed form by truncating the relevant sum at $p=3$ terms. As you can see the last term in the sum is at worst of the order of $10^{-15}$ which is negligible for practical purposes.
In[1692]:=
M = 3;
T2 = Table[
A Sum[ StirlingS2[2 p - 1, k] (-1)^(k - 1) k!/(1 + A)^(k + 1), {k,
1, 2 p - 1}], {p, 1, M}];
Clear[Terms];
Terms [A_, ll_, s_] =
Table[Simplify[( T2[[p]] /. A :> A ll/(1 - ll))] (s^2/2)^p/p!, {p, 2,
M}];
s = (RandomInteger[{0, 20}]/100)/Sqrt[256];
ll = RandomReal[{0, 1}, WorkingPrecision -> 50];
A = RandomReal[{0, 5}, WorkingPrecision -> 50];
N[NIntegrate[
Log[1 + ll (A Exp[s xi] - 1)] Exp[-xi^2/2]/
Sqrt[2 Pi], {xi, -Infinity, Infinity}, WorkingPrecision -> 14], 10]
N[Log[1 - ll] +
NIntegrate[
Log[1 + A ll/(1 - ll) Exp[s xi]] Exp[-xi^2/2]/
Sqrt[2 Pi], {xi, -Infinity, Infinity},
WorkingPrecision -> 14], 10]
(*This comes from expanding the Log[] in the integral above to second \
order in xi and integrating term by term.*)
Join[{N[Log[1 - ll + A ll] + ( (s^2) A (ll - ll^2) )/(
2 (1 - ll + A ll)^2), 10] }, Terms[A, ll, s]]
Out[1698]= 0.4001260648
Out[1699]= 0.4001260647
Out[1700]= {0.4001260652,
4.63239352341047007113417223619846949288159549561*10^-12, \
-1.63137128039387624683354129276554122034541505684*10^-15}
Now my question is twofold. Firstly can we prove that the series in \eqref{ii} do converge? Secondly can we use the result \eqref{ii} to find the optimal asset allocation $\lambda$ that maximizes the growth of log wealth in the long term?