Title: Polynomials
1Polynomials
2Content
- Evaluation
- Root finding
- Interpolation
- Resultant
3Introduction
- Best understood and most applied functions
- Taylors expansion
- Basis of parametric curve/surface
- Data fitting
- Basic Theorem
- Weierstrass Approximation Theorem
- Fundamental Theorem of Algebra
4Evaluation Horners Method
- Compare number of multiplications and additions
5Details
6Details (cont)
7Evaluating xk Efficiently
- Instead of using pow(x,k), or any
iterative/recursive subroutines, think again! - The S-and-X method S(square) X(multiply-by-x)
- See how it works in the next pages
- Understand how to implement in program
8- Say the exponent k in base-2 a2a1a0 (kgt3)
Each symbol, S or X, represents a multiplication
Except for the leading digit, replace 1 by SX,
0 by S
7
4
3
3
of ?
9Implementation
Left-to-right scan
1
1
1
0
1
z
x2
x4
x16
x8
x
10Multiplication, division
- FFT
- GCD of polynomials (Euler algorithm)
11Roots of Polynomials
- Low order polynomials (for degree ?4)
Hi-precision formula for quadratics
Quartics see notes
12Calculator City (ref)
13Root Counting
- P(x) has n complex roots, counting multiplicities
- If ais are all real, then the complex roots
occur in conjugate pairs. - Descartes rules of sign
- Sturms sequence
- Bounds on roots
- Deflation
14Computing Roots Numerically
- Newton is the main method for root finding
- Can be implemented efficiently using Horners
method - Quadratic convergence except for multiple root
- Use deflation to resolve root multiplicity but
can accumulate error polynomials are sensitive
to coefficient variations - Newton-Maehlys method roots converges
quadratically even if previous roots are
inaccurate
15(No Transcript)
16Experiment
- P(x)(x-1)(x-2)(x-3)(x21)
- Assume two imprecise roots have been found, 1.1
1.9 - The deflated (cubic) polynomial is then
- x3-3x20.91x-3
17Original quintic Converged to 3 in many steps (5
was not a good guess for 3)
Deflated cubic Faster convergence, but solution
was plagued with the propagated error
Maehly procedure Fast convergence accurate
solution
18Polynomial Interpolation
- Given (n1) pairs of points (xi,f(xi)) find a
nth-degree polynomial Pn(x) to pass through these
points - Compute the function value not listed in the
table by evaluating the interpolating polynomial
19Lagrange Polynomial
- High computational cost cannot reuse points
- Divided difference a better alternative
20Divided Difference
21Divided Difference (cont)
22(No Transcript)
23Resultant
- An expression involving polynomial coefficients
such that the vanishing of the expression is
necessary and sufficient for the set of
polynomials to have a common zero.
24Resultant (cont)
with
The above system has common zero
The equation Qz 0 has nonzero solution IFF
Rdet(Q) vanishes. R is called the resultant of
the equations.
25Example
26Applications of Resultant
II. Algebraic curve intersection
I. Common zero
III. Implicitization
R(x) 0 IFF intersection exists
27Sylvester Matrix and Resultant
28Find Common Zero
- The system has simultaneous zero iff the
resultant is zero
29Result from Linear Algebra
has non-trivial solution if det(A) 0
A reduced system gives the ratio
30Sylvester Resultant
- To find the common zero, consider the reduced
system
31Resultant in Maxima
x as independent variable
32Algebraic Curve Intersection
No real roots no intersection (circle
hyperbola)
33Algebraic Curve Intersection
2 real roots 2 intersection points
34Implicitization
The above system in t has a common zero whenever
(x,y) is a point on the curve.
a parabola
Application parametric curve intersection Find
the corresponding parameter of (x,y) on the curve
35Parametric Curve Intersection
implicitize
F(s)f(x(s),y(s))0
f(x,y)0
Find roots in 0,1
Bernstein polynomial
Cubic Bezier curve and its control points
36Quadratic Bezier Curve Intersection
Sketch using de Casteljau algorithm 1, 2
37De Casteljau Algorithm ref
A cubic Bezier curve with 4 control points
p(t), t?0,1 is defined. Locate p(0.5)
38Inversion
Given (x,y) on the curve, find the corresponding
parameter t
Example