Previous Up Next

2.24.17  Rewrite in terms of the powers of (x-a) : ptayl

ptayl is used to rewrite a polynomial P depending of x in terms of the powers of (x-a) (ptayl means polynomial Taylor)
ptayl takes two arguments: a polynomial P given by a symbolic expression or by the list of it’s coefficients and a number a.
ptayl returns the polynomial Q such that Q(x-a)=P(x)
Input :

ptayl(x^2+2*x+1,2)

Output, the polynomial Q:

x^2+6*x+9

Input :

ptayl([1,2,1],2)

Output :

[1,6,9]

Remark

P(x)=Q(x-a)

i.e. for the example :
x2+2x+1=(x−2)2+6(x−2)+9


Previous Up Next