0
$\begingroup$

Using Sympy, I would like to compute the negative binomial expansion of a general symbolic polynomial, e.g., $(x_1 + x_2 + x_3 + 4 x_4)^{-1}$. I understand that I can go by recursively partitioning the expression inside the parenthesis into two parts and computing their expansion like $x_1$ and $x_2 + x_3 + 4 x_4$, then, $x_2$ and $x_3 + 4 x_4$, and so on.

Is there a more efficient way to do this? Thanks.

$\endgroup$
  • 1
    $\begingroup$ The result will be an infinite sum of terms, is that what you are looking for? $\endgroup$ – Maxim Umansky Oct 14 at 17:56
  • $\begingroup$ @MaximUmansky, it will be if I consider all terms. I would like to know whether there is a more efficient or clever way to do it. $\endgroup$ – Omar Shehab Oct 15 at 3:35
  • 1
    $\begingroup$ If you want to know all coefficients of that expansion then it will be an infinite size problem. What do we call an "efficient" way for solving an infinite size problem? No matter how you do it, the amount of work is infinite, right? If there was some extra condition allowing truncation then one could think of approaches that would be more efficient than others. $\endgroup$ – Maxim Umansky Oct 15 at 5:03

Your Answer

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

Browse other questions tagged or ask your own question.