PolynomialTools
RootPowerSum
compute the sum of a give power of the roots of a polynomial
Calling Sequence
Parameters
Description
Examples
Compatibility
RootPowerSum( p, x, n )
p
-
: polynom : a polynomial in x
x
: name : the indeterminate
n
: nonnegint : the power of the roots of p
The RootPowerSum( p, x, n ) command computes the sum of the n-th powers of the roots of the polynomial p in the indeterminate x.
Note that RootPowerSum( p, x, 0 ) is the same as the degree of p in x; RootPowerSum( p, x, 1 ) is the sum of the roots of p (as a polynomial in x); RootPowerSum( p, x, 2 ) is the sum of the squares of the roots of p; and so on.
with⁡PolynomialTools:
p≔x3−2⁢x2−5⁢x+3
RootPowerSum⁡p,x,0
3
RootPowerSum⁡p,x,1
2
RootPowerSum⁡p,x,2
14
p≔expand⁡x−2⁢x−12
p≔x3−4⁢x2+5⁢x−2
4
6
RootPowerSum⁡p,x,3
10
RootPowerSum⁡p,x,4
18
p≔x4⁢y−y2⁢x+x⁢y−4
RootPowerSum⁡p,y,0
3⁢y−3
RootPowerSum⁡p,y,2
x7+2⁢x4+x−8x
A generic cubic polynomial expressed as a product of linear factors.
p≔expand⁡x−r⁢x−s⁢x−t
p≔−r⁢s⁢t+r⁢s⁢x+r⁢t⁢x−r⁢x2+s⁢t⁢x−s⁢x2−t⁢x2+x3
r+s+t
r2+s2+t2
RootPowerSum⁡p,x,30
r30+s30+t30
Consider a general quadratic polynomial in x.
p≔a⁢x2+b⁢x+c
d≔discrim⁡p,x
d≔−4⁢a⁢c+b2
The quadratic formula gives us the following roots for p.
u≔−b+sqrt⁡d2⁢a
u≔−b+−4⁢a⁢c+b22⁢a
v≔−b−sqrt⁡d2⁢a
v≔−b−−4⁢a⁢c+b22⁢a
RootPowerSum⁡p,x,1=normal⁡u+v
−ba=−ba
RootPowerSum⁡p,x,2=normal⁡u2+v2
−2⁢a⁢c−b2a2=−2⁢a⁢c−b2a2
RootPowerSum⁡p,x,3=normal⁡u3+v3
b⁢3⁢a⁢c−b2a3=b⁢3⁢a⁢c−b2a3
As a polynomial in x, this polynomial has roots y, 2⁢z and y⁢z.
p≔expand⁡x−y⁢x−2⁢z⁢x−y⁢z
p≔−x2⁢y⁢z+x⁢y2⁢z+2⁢x⁢y⁢z2−2⁢y2⁢z2+x3−x2⁢y−2⁢x2⁢z+2⁢x⁢y⁢z
y⁢z+y+2⁢z
y2⁢z2+y2+4⁢z2
RootPowerSum⁡mul⁡x−r‖i,i=1..12,x,10
r110+r1010+r1110+r1210+r210+r310+r410+r510+r610+r710+r810+r910
p≔expand⁡x−sqrt⁡2⁢x−sqrt⁡3⁢x−sqrt⁡7
p≔x3−x2⁢7−x2⁢3+x⁢3⁢7−2⁢x2+2⁢x⁢7+2⁢3⁢x−2⁢3⁢7
7+3+2
12
RootPowerSum⁡p,x,20
282535322
p≔expand⁡x−sqrt⁡2⁢x−sin⁡1⁢x−exp⁡t
p≔x3−x2⁢ⅇt−x2⁢sin⁡1+x⁢sin⁡1⁢ⅇt−2⁢x2+2⁢x⁢ⅇt+2⁢sin⁡1⁢x−2⁢sin⁡1⁢ⅇt
ⅇt+sin⁡1+2
ⅇt4+sin⁡14+4
The PolynomialTools[RootPowerSum] command was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
Download Help Document