1
$\begingroup$

Suppose

p[i_] = Series[2/x + 1 + a[i]*x + 1/b[i]*x^2, {x, 0, 3}]

How could I find the coeffients of $\prod_{i=1}^np_i$?

For example, I would like to define

u = Product[p[i], {i, 1, n}]

and find

SeriesCoefficient[u, -1]
SeriesCoefficient[u, 0]
SeriesCoefficient[u, 1]
SeriesCoefficient[u, 2]
$\endgroup$
  • $\begingroup$ Just to be clear: You want this for a general indeterminate n, correct? $\endgroup$ – Michael E2 May 13 '19 at 19:00
  • $\begingroup$ How about something like n = 5; Series[ Product[2/x + 1 + a[i]*x + 1/b[i]*x^2, {i, 1, n}], {x, 0, 3}] ? $\endgroup$ – user64494 May 13 '19 at 19:18
  • $\begingroup$ @MichaelE2 Yes. $\endgroup$ – Myath May 13 '19 at 19:45
2
$\begingroup$

Assuming your product is one that Mathematica doesn't know the closed form for, you could use my answer from Infinite product with O[x] here:

Unprotect[Series];

Series[Product[a_, b_], pt_] := Exp[MapAt[Sum[#, b]&, Series[Log[a], pt], 3]]
Series[Inactive[Product][a_, b_], pt_] := Series[Unevaluated[Product[a, b]], pt]

Protect[Series];

Then:

f = Inactive[Product][2/x + 1 + a[i] x + 1/b[i] x^2, {i, n}];
Series[f, {x, 0, 3}] //TeXForm

$\left(\frac{1}{x}\right)^n \left(2^n+2^{n-1} n x+2^{n-1} \left(\frac{n^2}{4}+2 \sum _i^n \frac{1}{8} (4 a(i)-1)\right) x^2+\frac{1}{3} 2^n \left(n \sum _i^n \frac{1}{8} (4 a(i)-1)+\frac{1}{4} n \left(\frac{n^2}{4}+2 \sum _i^n \frac{1}{8} (4 a(i)-1)\right)+3 \sum _i^n \frac{-6 a(i) b(i)+b(i)+12}{24 b(i)}\right) x^3+O\left(x^4\right)\right)$

This method won't be able to find the coefficient of $x^{-1}$, though, as finding the $(n-1)^{th}$ term is not possible without specifying an explicit value for $n$.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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