# How to write a recursive formula?

What is the Mathematica command for the recursive formula:

   F[a_]:=Sum[(-1)^a Binomial[a,k] Log[2]^(a-k) F[k], {k,0,a}]


where

 F[0]=Log[2]


Thank you,

The latex formula is

$$\int_0^1\frac{\ln^{a}\left(\frac{x}{1-x}\right)}{1+x}dx=(-1)^a \int_0^1\frac{\ln^{a}\left(\frac{2x}{1-x}\right)}{1+x}dx$$ $$=\sum_{k=0}^\infty(-1)^a \binom{a}{k}\ln^{a-k}(2)\int_0^1\frac{\ln^{k}\left(\frac{x}{1-x}\right)}{1+x}dx$$

which, by the way, follows from subbing $$x=\frac{1-y}{1+y}$$ then using the binomial theorem.

• You cannot determine F[a], where $a$ is even from these equations. For instance you get for $a=2$: F[2]==F[2] - 2 F[1] Log[2] + F[0] Log[2]^2. Your question has no solution. Commented Jul 29, 2023 at 7:26
• Can you give what the output should be for say F[2] or F[3]? Also it is Binomial not binomial Commented Jul 29, 2023 at 7:27
• Please include $\LaTeX$ for your formula to facilitate disambiguation.
– Syed
Commented Jul 29, 2023 at 7:28
• @Syed sure I will Commented Jul 29, 2023 at 7:33
• @yarchik sorry it is $(-1)^a$ not $(-1)^k$. Commented Jul 29, 2023 at 7:40

• It is impossible to deduce all the terms from the original recursive formula.
r1 = Block[{a = 1},
F[a] - Sum[(-1)^a Binomial[a, k] Log[2]^(a - k) F[k], {k, 0, a}] ==
0 // FullSimplify]
r2 = Block[{a = 2},
F[a] - Sum[(-1)^a Binomial[a, k] Log[2]^(a - k) F[k], {k, 0, a}] ==
0 // FullSimplify]
r3 = Block[{a = 3},
F[a] - Sum[(-1)^a Binomial[a, k] Log[2]^(a - k) F[k], {k, 0, a}] ==
0 // FullSimplify]
r4 = Block[{a = 4},
F[a] - Sum[(-1)^a Binomial[a, k] Log[2]^(a - k) F[k], {k, 0, a}] ==
0 // FullSimplify]


Observe the first 4 recursive formulas. We can see that we can deduce F[1] from F[0] by r1 or r2( actually r1 is equivalent to r2).

And we can also deduce F[3] from F[0],F[1],F[2] by r3 or r4, but we still cann't deduce F[2]. (BTW, under the condition of r1, the r3 and r4 are equivalent)

• The expression of f[2] as below indicate that f[2] it is unlikely can be deduce from f[0] and f[1].
f[a_] := Integrate[(Log[x/(1 - x)])^a/(1 + x), {x, 0, 1}];
{f[0], f[1], f[2]}
% // N
Table[NIntegrate[(Log[x/(1 - x)])^a/(1 + x), {x, 0, 1}], {a, {0, 1,
2}}]


• Thank you and sorry its $(-1)^a$ not $(-1)^k$ in the OP. Commented Jul 29, 2023 at 7:42
• @AliShadhar How to deduce the recursive formula ? Commented Jul 29, 2023 at 8:24
• I just added some steps in the OP showing how I came up with it. Commented Jul 29, 2023 at 8:26
• Very clear thank you. So basically this formula shows only relations among these integrals. Commented Jul 29, 2023 at 15:29