Merge pull request #65 from fangliu-tju/main
Update polynomial_roots.qmd
This commit is contained in:
commit
82b92c308f
@ -100,11 +100,11 @@ The following is an example where $f(x) = x^4 + 2x^2 + 5$ and $g(x) = x-2$:
|
||||
1 2 6 12 29
|
||||
```
|
||||
|
||||
The polynomial $f(x)$ is coded in terms of its coefficients ($a_n$, $a_{n-1}$, $\dots$, $a_1$, $a_0$) and is written on the top row. The algorithm then proceeds from left to right. The number just produced on the bottom row is multiplied by $c$ and placed under the coefficient of $f(x)$. Then values are then added to produce the next number. The sequence produced above is `1 2 6 12 29`. The last value (`29`) is $r=f(c)$, the others encode the coefficients of `q(x)`, which for this problem is $q(x)=x^3 + 2x + 6 + 12$. That is, we have written:
|
||||
The polynomial $f(x)$ is coded in terms of its coefficients ($a_n$, $a_{n-1}$, $\dots$, $a_1$, $a_0$) and is written on the top row. The algorithm then proceeds from left to right. The number just produced on the bottom row is multiplied by $c$ and placed under the coefficient of $f(x)$. Then values are then added to produce the next number. The sequence produced above is `1 2 6 12 29`. The last value (`29`) is $r=f(c)$, the others encode the coefficients of `q(x)`, which for this problem is $q(x)=x^3 + 2x^2 + 6x + 12$. That is, we have written:
|
||||
|
||||
|
||||
$$
|
||||
x^4 + 2x^2 + 5 = (x-2) \cdot (x^3 + 2x + 6 + 12) + 29.
|
||||
x^4 + 2x^2 + 5 = (x-2) \cdot (x^3 + 2x^2 + 6x + 12) + 29.
|
||||
$$
|
||||
|
||||
As $r$ is not $0$, we can say that $2$ is not a root of $f(x)$.
|
||||
@ -202,7 +202,7 @@ The function `together` would combine such terms, as an "inverse" to `apart`. Th
|
||||
### The rational root theorem
|
||||
|
||||
|
||||
Factoring polynomials to find roots is a task that most all readers here will recognize, and, perhaps, remember not so fondly. One helpful trick to find possible roots *by hand* is the [rational root theorem](http://en.wikipedia.org/wiki/Rational_root_theorem): if a polynomial has integer coefficients with $a_0 \neq 0$, than any rational root, $p/q$, must have $p$ dividing the constant $a_0$ and $q$ dividing the leading term $a_n$.
|
||||
Factoring polynomials to find roots is a task that most all readers here will recognize, and, perhaps, remember not so fondly. One helpful trick to find possible roots *by hand* is the [rational root theorem](http://en.wikipedia.org/wiki/Rational_root_theorem): if a polynomial has integer coefficients with $a_0 \neq 0$, then any rational root, $p/q$, must have $p$ dividing the constant $a_0$ and $q$ dividing the leading term $a_n$.
|
||||
|
||||
|
||||
To glimpse why, suppose we have a polynomial with a rational root and integer coefficients. With this in mind, a polynomial with identical roots may be written as $(qx -p)(a_{n-1}x^{n-1}+\cdots a_1 x + a_0)$, where each coefficient is an integer. Multiplying through, we get that the polynomial is $qa_{n-1}x^n + \cdots + pa_0$. So $q$ is a factor of the leading coefficient and $p$ is a factor of the constant.
|
||||
@ -339,7 +339,7 @@ Solving cubics and quartics can be done exactly using radicals. For example, her
|
||||
solve(y^4 - 2y - 1)
|
||||
```
|
||||
|
||||
Third- and fourth-degree polynomials can be solved in general, with increasingly more complicated answers. The following finds one of the answers for a general third-degre polynomial:
|
||||
Third- and fourth-degree polynomials can be solved in general, with increasingly more complicated answers. The following finds one of the answers for a general third-degree polynomial:
|
||||
|
||||
|
||||
```{julia}
|
||||
@ -908,7 +908,7 @@ The roots of the [Chebyshev](https://en.wikipedia.org/wiki/Chebyshev_polynomials
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
"``4x^2 - 1``",
|
||||
"``2x^2 - 1``",
|
||||
"``2x^2``",
|
||||
"``x``",
|
||||
"``2x``"]
|
||||
@ -925,11 +925,11 @@ radioq(choices, answ)
|
||||
yesnoq(true)
|
||||
```
|
||||
|
||||
* The fifth one is $T_5(x) = 32x^5 - 32x^3 + 6x$. Cauchy's bound says that the largest root has absolute value
|
||||
* The fifth one is $T_5(x) = 16x^5 - 20x^3 + 5x$. Cauchy's bound says that the largest root has absolute value
|
||||
|
||||
|
||||
```{julia}
|
||||
1 + 1 + 6/32
|
||||
1 + 20/16 + 5/16
|
||||
```
|
||||
|
||||
The Chebyshev polynomials have the property that in fact all $n$ roots are real, distinct, and in $[-1, 1]$. Using `SymPy`, find the magnitude of the largest root:
|
||||
@ -980,7 +980,7 @@ First: For a monic $p$ if $p_0 < 0$ then `var(p)` is odd and if $p_0 > 0$ then
|
||||
This is true for degree $n=1$ the two sign patterns under the assumption are `+-` ($p_0 < 0$) or `++` ($p_0 > 0$). If it is true for degree $n-1$, then the we can consider the sign pattern of such an $n$ degree polynomial having one of these patterns: `+...+-` or `+...--` (if $p_0 < 0$) or `+...++` or `+...-+` if ($p_0>0$). An induction step applied to all but the last sign for these four patterns leads to even, odd, even, odd as the number of sign changes. Incorporating the last sign leads to odd, odd, even, even as the number of sign changes.
|
||||
|
||||
|
||||
Second: For a monic $p$ if `p_0 < 0` then `pos(p)` is *odd*, if `p_0 > 0` then `pos(p)` is even.
|
||||
Second: For a monic $p$ if $p_0 < 0$ then `pos(p)` is *odd*, if $p_0 > 0$ then `pos(p)` is even.
|
||||
|
||||
|
||||
This is clearly true for **monic** degree $1$ polynomials: if $c$ is positive $p = x - c$ has one real root (an odd number) and $p = x + c$ has $0$ real roots (an even number). Now, suppose $p$ has degree $n$ and is monic. Then as $x$ goes to $\infty$, it must be $p$ goes to $\infty$.
|
||||
@ -989,7 +989,7 @@ This is clearly true for **monic** degree $1$ polynomials: if $c$ is positive $p
|
||||
If $p_0 < 0$ then there must be a positive real root, say $r$, (Bolzano's intermediate value theorem). Dividing $p$ by $(x-r)$ to produce $q$ requires $q_0$ to be *positive* and of lower degree. By *induction* $q$ will have an even number of roots. Add in the root $r$ to see that $p$ will have an **odd** number of roots.
|
||||
|
||||
|
||||
Now consider the case $p_0 > 0$. There are two possibilities either `pos(p)` is zero or positive. If `pos(p)` is $0$ then there are an even number of roots. If `pos(p)` is positive, then call $r$ one of the real positive roots. Again divide by $x-r$ to produce $p = (x-r) \cdot q$. Then $q_0$ must be *negative* for $p_0$ to be positive. By *induction* $q$ must have an odd number or roots, meaning $p$ must have an even numbers
|
||||
Now consider the case $p_0 > 0$. There are two possibilities either `pos(p)` is zero or positive. If `pos(p)` is $0$ then there are an even number of roots. If `pos(p)` is positive, then call $r$ one of the real positive roots. Again divide by $x-r$ to produce $p = (x-r) \cdot q$. Then $q_0$ must be *negative* for $p_0$ to be positive. By *induction* $q$ must have an odd number of roots, meaning $p$ must have an even numbers.
|
||||
|
||||
|
||||
So there is parity between `var(p)` and `pos(p)`: if $p$ is monic and $p_0 < 0$ then both `var(p)` and `pos(p)` are both odd; and if $p_0 > 0$ both `var(p)` and `pos(p)` are both even.
|
||||
@ -998,7 +998,7 @@ So there is parity between `var(p)` and `pos(p)`: if $p$ is monic and $p_0 < 0$
|
||||
Descartes' rule of signs will be established if it can be shown that `var(p)` is at least as big as `pos(p)`. Supppose $r$ is a positive real root of $p$ with $p = (x-r)q$. We show that `var(p) > var(q)` which can be repeatedly applied to show that if $p=(x-r_1)\cdot(x-r_2)\cdot \cdots \cdot (x-r_l) q$, where the $r_i$s are the postive real roots, then `var(p) >= l + var(q) >= l = pos(p)`.
|
||||
|
||||
|
||||
As $p = (x-c)q$ we must have the leading term is $p_nx^n = x \cdot q_{n-1} x^{n-1}$ so $q_{n_1}$ will also be `+` under our monic assumption. Looking at a possible pattern for the signs of $q$, we might see the following unfinished synthetic division table for a specific $q$:
|
||||
As $p = (x-c)q$ we must have the leading term is $p_nx^n = x \cdot q_{n-1} x^{n-1}$ so $q_{n-1}$ will also be `+` under our monic assumption. Looking at a possible pattern for the signs of $q$, we might see the following unfinished synthetic division table for a specific $q$:
|
||||
|
||||
|
||||
```{verbatim}
|
||||
|
Loading…
Reference in New Issue
Block a user