There may not be an "easy" way to factor (v (1 - v)^2)
from poly[n, v]
, leaving an n
-th order polynomial. Here is a not-so-easy approach. Begin by simplifying the form of poly
, representing (-1 + 2 v)^(2 + n)
by t
.
eq1 = Collect[poly[n, v] /. (-1 + 2 v)^(2 + n) -> t, v, Simplify]
(* (5 + 2 n) ((-1)^n - t) + (2 - 10 (-1)^n - 4 (-1)^n n + 4 t + 2 n t) v
+ (-1 + 5 (-1)^n + 2 (-1)^n n) v^2 *)
Now, t
can be expanded by the Binomial Theorem
Hold[Sum[Binomial[n + 2, k] (-1)^(n + 2 - k) (2 v)^k, {k, 0, n + 2}]];
which can be rewritten as
2 v Hold[Sum[Binomial[n + 2, k] (-1)^(n + 2 - k) (2 v)^(k - 1), {k, 1, n + 2}]]
+ Sum[Binomial[n + 2, k] (-1)^(n + 2 - k) (2 v)^k, {k, 0, 0}];
which, when inserted into eq1
, yields
eq2 = Collect[eq1 /. ((-1)^n - t) -> ((-1)^(n + 2) - %), {v, t}, Simplify]
(* (-1 + 5*(-1)^n + 2*(-1)^n*n)*v^2 + v*(2 - 10*(-1)^n - 4*(-1)^n*n + 2*(2 + n)*t -
2*(5 + 2*n)*Hold[Sum[Binomial[n + 2, k]*(-1)^(n + 2 - k)*(2*v)^(k - 1),
{k, 1, n + 2}]]) *)
thereby factoring out v
. Next, divide out that factor of v
and replace v
elsewhere by x+1
.
eq3 = Collect[Cancel[eq2/v] /. v -> x + 1, {x, t}, Simplify]
(* 1 - 5*(-1)^n - 2*(-1)^n*n + 2*(2 + n)*t + (-1 + 5*(-1)^n + 2*(-1)^n*n)*x
- 2*(5 + 2*n)*Hold[Sum[Binomial[n + 2, k]*(-1)^(n + 2 - k)*(2*(1 + x))^(k - 1),
{k, 1, n + 2}]] *)
Again, expand t
by the Binomial Theorem, this time in terms of x
.
Hold[Sum[Binomial[n + 2, k] (2 x)^k, {k, 0, n + 2}]];
which can be rewritten as
(2 x)^2 Hold[Sum[Binomial[n + 2, k] (2 x)^(k - 2), {k, 2, n + 2}]] +
Sum[Binomial[n + 2, k] (2 x)^k, {k, 0, 1}]
(* 1 + 2*(2 + n)*x +
4*x^2*Hold[Sum[Binomial[n + 2, k]*(2*x)^(k - 2), {k, 2, n + 2}]] *)
which, when inserted into eq3
, yields
eq7 = Collect[eq3 /. t -> %, x, Simplify]
(* (5 + 2*n)*(3 + (-1)^n + 2*n)*x + 8*(2 + n)*x^2*
Hold[Sum[Binomial[n + 2, k]*(2*x)^(k - 2), {k, 2, n + 2}]] -
(5 + 2*n)*(-1 + (-1)^n + 2*Hold[Sum[Binomial[n + 2, k]*(-1)^(n + 2 - k)*
(2*(1 + x))^(k - 1), {k, 1, n + 2}]]) *)
The second Sum
is in powers of 1 + x
, and we need it in powers of x
. Once again, the Binomial Theorem facilitates this transformation, replacing (1 + x))^(k - 1)
by
Hold[Sum[Binomial[k - 1, kk] x^kk, {kk, 0, k - 1}]];
which allows the second Sum
in eq7
to be rewritten as
eq4 = 2 Hold[Sum[Binomial[n + 2, k] (-1)^(n + 2 - k) 2^(k - 1)
Binomial[k - 1, kk] x^kk, {k, 1, n + 2}, {kk, 0, k - 1}]];
Interchanging the order of the two indices, k
and kk
, then gives
eq5 = 2 Hold[Sum[Binomial[n + 2, k] Binomial[k - 1, kk] (-1)^(n + 2 - k)
2^(k - 1) x^kk, {kk, 0, n + 1}, {k, kk + 1, n + 2}]];
Because this interchange tends to be error-prone, it is prudent to verify that the two expressions are the same (here for n == 5).
Simplify[ReleaseHold[eq4 == eq5] /. n -> 5]
(* True *)
Next, explicitly perform the inner sum.
Sum[Binomial[n + 2, k] Binomial[k - 1, kk] (-1)^(n + 2 - k)
2^(k - 1) x^kk, {k, kk + 1, n + 2}]
(* (-1)^(1 - kk + n) 2^kk x^kk Binomial[2 + n, 1 + kk]
Hypergeometric2F1[1 + kk, -1 + kk - n, 2 + kk, 2] *)
and insert the result into the outer Sum
.
eq6 = 2 Hold[Sum[(-1)^(1 - kk + n) (2 x)^kk Binomial[2 + n, 1 + kk]
Hypergeometric2F1[1 + kk, -1 + kk - n, 2 + kk, 2], {kk, 0, n + 1}]];
ReleaseHold[eq5 == eq6]
(* True *)
eq6
can be rewritten as
2 (2 x)^2 Hold[Sum[(-1)^(1 - kk + n) (2 x)^(kk - 2) Binomial[2 + n, 1 + kk]
Hypergeometric2F1[1 + kk, -1 + kk - n, 2 + kk, 2], {kk, 3, n + 1}]] +
2 Sum[(-1)^(1 - kk + n) (2 x)^kk Binomial[2 + n, 1 + kk]
Hypergeometric2F1[1 + kk, -1 + kk - n, 2 + kk, 2], {kk, 0, 2}];
and inserted into eq7
.
eq7 /. 2 Hold[_] -> %
eq8 = Collect[%/x^2, x, Simplify[#, n ∈ Integers] &] /. x -> v - 1
(* 8*(2 + n)*Hold[Sum[Binomial[n + 2, k]*(2*(-1 + v))^(k - 2), {k, 2, n + 2}]] -
(5 + 2*n)*(1 + (-1)^(1 + n) + 4*n + 2*n^2 +
8*Hold[Sum[(-1)^(1 - kk + n)*(2*(-1 + v))^(kk - 2)*Binomial[2 + n, 1 + kk]*
Hypergeometric2F1[1 + kk, -1 + kk - n, 2 + kk, 2], {kk, 3, n + 1}]]) *)
Note that x^2 == (v - 1)^2
has been factored from eq8
, and eq8 is the desired remainder. As verification,
Simplify[ReleaseHold[eq8 /. n -> 15] == poly[15, v]/(v (1 - v)^2)]
(* True *)
Incidentally, Mathematica diligently performs the general Sum
s in eq8
, if Hold
is removed, but the resulting expression is not a step in the right direction.
Series[poly[n, v] / v (v - 1)^2) , {v, 0, 2}]
nicely gives a polynomial in v without negative exponents, so for anyn
the polynomial has this factor, and we have the first three coefficients after division. $\endgroup$poly[n, v]
is divisible by(v (v - 1)^2)
, thenpoly[n, v] / v (v - 1)^2)
must be a polynomial of ordern
inv
. This is true only ifSimplify[SeriesCoefficient[poly[n, v]/(v (v - 1)^2), {v, 0, n + 1}], n ∈ Integers && n > 0]
is zero, and it is $\endgroup$poly[n, v] / (v (v - 1)^2))
? Thanks. $\endgroup$