Problem:
Solution:
Part (a) is obvious
$ \begin{eqnarray*} & & \frac{f}{GCD(f, f')} \\ &=& \frac{c(x - a_1)^{r_1} \cdots (x - a_n)^{r_n}}{(x - a_1)^{r_1 - 1} \cdots (x - a_n)^{r_n - 1}} \\ &=& c(x - a_1) \cdots (x - a_n) \\ &=& f_{\text{red}} \end{eqnarray*} $
Part (b) is just an application of the formula.
print "Problem 15"
f = polynomial.from_string("x^11 - x^10 + 2x^8 - 4x^7 + 3x^5 - 3x^4 + x^3 + 3x^2 - x - 1")
fd = f.derivative()
g = polynomial.polynomial_gcd(f, fd)
(q, r) = polynomial.polynomial_divide(f, g)
print q
The square free part of the polynomial is $ x^5 + x^2 - x - 1 $
Solution:
Part (a) is obvious
$ \begin{eqnarray*} & & \frac{f}{GCD(f, f')} \\ &=& \frac{c(x - a_1)^{r_1} \cdots (x - a_n)^{r_n}}{(x - a_1)^{r_1 - 1} \cdots (x - a_n)^{r_n - 1}} \\ &=& c(x - a_1) \cdots (x - a_n) \\ &=& f_{\text{red}} \end{eqnarray*} $
Part (b) is just an application of the formula.
print "Problem 15"
f = polynomial.from_string("x^11 - x^10 + 2x^8 - 4x^7 + 3x^5 - 3x^4 + x^3 + 3x^2 - x - 1")
fd = f.derivative()
g = polynomial.polynomial_gcd(f, fd)
(q, r) = polynomial.polynomial_divide(f, g)
print q
No comments:
Post a Comment