PolynomialTools/RootPowerSum - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : PolynomialTools/RootPowerSum

PolynomialTools

  

RootPowerSum

  

compute the sum of a give power of the roots of a polynomial

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

RootPowerSum( p, x, n )

Parameters

p

-

: polynom : a polynomial in x

x

-

: name : the indeterminate

n

-

: nonnegint : the power of the roots of p

Description

• 

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.

Examples

> 

with⁡PolynomialTools:

> 

p≔x3−2⁢x2−5⁢x+3

p≔x3−2⁢x2−5⁢x+3

(1)
> 

RootPowerSum⁡p,x,0

3

(2)
> 

RootPowerSum⁡p,x,1

2

(3)
> 

RootPowerSum⁡p,x,2

14

(4)
> 

p≔expand⁡x−2⁢x−12

p≔x3−4⁢x2+5⁢x−2

(5)
> 

RootPowerSum⁡p,x,0

3

(6)
> 

RootPowerSum⁡p,x,1

4

(7)
> 

RootPowerSum⁡p,x,2

6

(8)
> 

RootPowerSum⁡p,x,3

10

(9)
> 

RootPowerSum⁡p,x,4

18

(10)
> 

p≔x4⁢y−y2⁢x+x⁢y−4

p≔x4⁢y−y2⁢x+x⁢y−4

(11)
> 

RootPowerSum⁡p,x,0

4

(12)
> 

RootPowerSum⁡p,y,0

2

(13)
> 

RootPowerSum⁡p,x,3

3⁢y−3

(14)
> 

RootPowerSum⁡p,y,2

x7+2⁢x4+x−8x

(15)

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

(16)
> 

RootPowerSum⁡p,x,1

r+s+t

(17)
> 

RootPowerSum⁡p,x,2

r2+s2+t2

(18)
> 

RootPowerSum⁡p,x,30

r30+s30+t30

(19)

Consider a general quadratic polynomial in x.

> 

p≔a⁢x2+b⁢x+c

p≔a⁢x2+b⁢x+c

(20)
> 

d≔discrim⁡p,x

d≔−4⁢a⁢c+b2

(21)

The quadratic formula gives us the following roots for p.

> 

u≔−b+sqrt⁡d2⁢a

u≔−b+−4⁢a⁢c+b22⁢a

(22)
> 

v≔−b−sqrt⁡d2⁢a

v≔−b−−4⁢a⁢c+b22⁢a

(23)
> 

RootPowerSum⁡p,x,1=normal⁡u+v

−ba=−ba

(24)
> 

RootPowerSum⁡p,x,2=normal⁡u2+v2

−2⁢a⁢c−b2a2=−2⁢a⁢c−b2a2

(25)
> 

RootPowerSum⁡p,x,3=normal⁡u3+v3

b⁢3⁢a⁢c−b2a3=b⁢3⁢a⁢c−b2a3

(26)

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

(27)
> 

RootPowerSum⁡p,x,0

3

(28)
> 

RootPowerSum⁡p,x,1

y⁢z+y+2⁢z

(29)
> 

RootPowerSum⁡p,x,2

y2⁢z2+y2+4⁢z2

(30)
> 

RootPowerSum⁡mul⁡x−r‖i,i=1..12,x,10

r110+r1010+r1110+r1210+r210+r310+r410+r510+r610+r710+r810+r910

(31)
> 

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

(32)
> 

RootPowerSum⁡p,x,1

7+3+2

(33)
> 

RootPowerSum⁡p,x,2

12

(34)
> 

RootPowerSum⁡p,x,20

282535322

(35)
> 

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

(36)
> 

RootPowerSum⁡p,x,1

ⅇt+sin⁡1+2

(37)
> 

RootPowerSum⁡p,x,4

ⅇt4+sin⁡14+4

(38)

Compatibility

• 

The PolynomialTools[RootPowerSum] command was introduced in Maple 2022.

• 

For more information on Maple 2022 changes, see Updates in Maple 2022.

See Also

PolynomialTools