# Tag Info

## Hot answers tagged polynomials

5

poly = x^5 + 6 x^4 + 2 x^3 - 8 x^2 + x + 10; With Cases Cases[poly, Alternatives @@ (a_. x^{_, 1, 0}) :> a] {10, 1, -8, 2, 6, 1} and to isolate the constant with DeleteCases DeleteCases[poly, Alternatives @@ (a_. x^{_, 1})] 10 Or with CoefficientList CoefficientList[poly, x] {10, 1, -8, 2, 6, 1} and the constant with Coefficient[poly, x, ...

2

poly1 = (x^3 + 3 x^2 - 18 x - 40); poly2 = (x - 4); query = "polynomial long division (" <> ToString[poly1, InputForm] <> ")/(" <> ToString[poly2, InputForm] <> ")"; WolframAlpha[query, {{"QuotientAndRemainder"}, "Content"}, PodStates -> {"QuotientAndRemainder__Step-by-step solution"}] (quotient = poly1/poly2 // Simplify) //...

2

The usual approach for problems like these is to combine GeneratingFunction[] (as already noted by the OP) with DifferenceRoot[], as in the following: GeneratingFunction[DifferenceRoot[Function[{a, k}, {a[k] == a[k - 1]/k, a[0] == 1}]][k], k, x] DifferentialRoot[Function[{y, x}, {-y[x] + y'[x] == 0, y[0] == 1}]][x] after which one can ...

1

Another approach: sub[poly_, x_] := Module[{cc, reduced, d}, cc = Abs@Rest@CoefficientList[poly, x]; reduced = DeleteCases[Except[_Integer]] /@ (cc^(1/Range[Length@cc])); d = GCD @@ reduced; x -> x/d ]; Examples: pol /. sub[pol, x] (* 80 - 8 x - 3 x^2 *) pol2 = 145 + 5556600 x + 28991671632 x^2 + 57456600591796875000000 x^3 + ...

1

This seems to work correctly: subsimp[pol_] := Module[{co, pr, ex, d}, co = Abs[CoefficientList[pol, x][[2 ;; -1]]]; pr = Intersection @@ (FactorInteger[#][[All, 1]] & /@ co); ex = Min /@ Transpose[ Quotient[IntegerExponent[Coefficient[pol, x, #], pr], #] & /@ Range[Length[co]]]; d = Times @@ (Power @@@ Transpose[{pr, ex}]); ...

1

The classical method for converting a polynomial to an orthogonal basis is Salzer's algorithm. Adapted to the Legendre case, here is how to use it for conversion: bb = CoefficientList[6 x^3 - x^2 + x, x] {0, 1, -1, 6} Clear[a]; n = Length[bb] - 1; a[0, 0] = a[1, 1] = bb[[n + 1]]; a[0, 1] = bb[[n]]; Do[a[0, k + 1] = bb[[n - k]] + a[1, k]/3; Do[a[m, k +...

1

It has been mentioned in other answers that the case of the denominator having multiple roots is problematic. One should then recall what Residue[] actually does, and instead use the more general functionality of Series[] to get the necessary components of the partial fraction decomposition. Let us demonstrate on two of Nasser's examples. Here's an easy one ...

1

At least for this case, one can also consider getting the eigenvalues of the Jacobi matrix associated with the Hermite polynomials. Recall that these matrices are constructed from the coefficients of the three-term recurrences that generate the corresponding orthogonal polynomial. Applied to this case, we have: With[{n = 18}, s1 = Sort[Eigenvalues[N[...

Only top voted, non community-wiki answers of a minimum length are eligible