1
$\begingroup$

Suppose I have the following expression:

p[l_] := 1 + ((1 - q) p)/q Sum[(p (2 - p))^k/q^k, {k, 0, l}]

or

$p(\ell)=1+\dfrac{(1-q)p}{q}\sum_{k=0}^{k=\ell}\dfrac{p^k(2-p)^k}{q^k}$

Is there a way to get a general formula for the coefficients of its monomial expansion when $\ell$ is an arbitrary integer?

$\endgroup$
1
  • 2
    $\begingroup$ I don't think it's a good idea to use the symbol p for two different things (function name and variable). $\endgroup$
    – Roman
    May 7, 2019 at 17:34

2 Answers 2

1
$\begingroup$

Is this what you're looking for:

SeriesCoefficient[p[l], {l, 0, n}] //TeXForm

$\begin{cases} p \left(\frac{1}{q}-1\right)+1 & n=0 \\ -\frac{(p-2) p^2 (q-1) (\log (-(p-2) p)-\log (q))^n}{q n! \left(p^2-2 p+q\right)} & n>0 \end{cases}$

$\endgroup$
3
  • 2
    $\begingroup$ With v12, if p[l] is full simplified prior to evaluating SeriesCoefficient, i.e., SeriesCoefficient[p[l]//FullSimplify, {l, 0, n}], the result for n == 0 is wrong. Do you know why this happens? This does not happen with v11.3. $\endgroup$
    – Bob Hanlon
    May 7, 2019 at 18:18
  • $\begingroup$ I agree, I think it's worth reporting the issue to support! $\endgroup$
    – Carl Woll
    May 7, 2019 at 20:06
  • $\begingroup$ Reported to Tech Support (CASE:4257770). $\endgroup$
    – Bob Hanlon
    May 7, 2019 at 21:59
1
$\begingroup$

Replacing $(2-p)^k$ by a multinomial and rearranging terms gives

pp[l_] := 1 + (1 - q)/q *
  Sum[(-1)^(s-k-1)*2^(2k+1-s)*Binomial[k, 2k+1-s] * p^s/q^k,
    {k, 0, l}, {s, k + 1, 2 k + 1}]

check:

Table[p[l] == pp[l], {l, 0, 10}] // FullSimplify
(* {True, True, True, True, True, True, True, True, True, True, True} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.