{VERSION 3 0 "SGI MIPS UNIX" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "" -1 256 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 256 29 "Solving po lynomial equations." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 60 "Consider a polynomial in 1 variable. What are the solut ions?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "f:=x^3+x+1;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "r1, r2, r3 := solve(f,x); # \+ Solutions are nested radicals" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "s:=fsolve(f,x); # Solutions are floating point real numbers." }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "Digits:=20; s:=fsolve(f,x); Digits:=10;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "t1,t2,t3 := fsolve(f,x,complex); # Solutions are floating point complex numbers" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "u := RootOf(f,x); # unspe cified root of f. Computation with Q(u) is done as with Q[x]/(f)." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "with(padic): v1,v2,v3:=root p(f,47,10); # Approximations of roots in 47-adic numbers." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "for i in [r1,r2,r3,s,t1,t2,t3] do simplify(subs(x=i,f )) od; # all =0 or close to 0" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 106 "for i in [v1,v2,v3] do evalp(subs(x=i,f),47,12) od; # All close to 0, i.e. divisible by high powers of 49:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 141 "As you ca n see, there are different kind of solutions, so it is not so clear a \+ priori what it means to compute the solutions of a polynomial." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 153 "r1,r2,r3 are solutions expressed as nested radicals (we take n'th roots of exp ressions that can also contain m'th roots or that contain nested radic als)." }}{PARA 0 "" 0 "" {TEXT -1 57 "Disadvantages of expressing solu tions as nested radicals:" }}{PARA 0 "" 0 "" {TEXT -1 142 "R1) the exp ressions can be large, and that makes them hard to handle, the computa tion can be slow if we work with solutions of f in this form." }} {PARA 0 "" 0 "" {TEXT -1 94 "R2) Galois theory tells us that not all p olynomials can be solved in terms of nested radicals." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 323 "s, and t1,t2,t3 are \+ approximations of real solutions and complex solutions of f. For any p olynomial of degree n, we can always compute (counted with multiplicit y) n complex solutions up to some given accuracy. So we don't have dis advantage R2), and if we don't take many decimals then we don't have d isadvantage 1) either." }}{PARA 0 "" 0 "" {TEXT -1 14 "Disadvantages: " }}{PARA 0 "" 0 "" {TEXT -1 558 "T1) Some questions become difficult \+ when the numbers are not exact. Suppose you have a polynomial a*x^2+b* x+c and you wonder if it has 2 roots, or just 1 double root, you wonde r if the discriminant equals 0. If a,b,c are floating point numbers, t hen you can not determine the discriminant exactly but only approximat ely. But if the discriminant you compute is 0.12*10^(-5) is that then \+ 0 or not? That is not easy to say. It is also not possible to prove th at a certain number equals 0 this way, because that's hard to say when you just have an approximation." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 1145 "u is also a solution of f. It has none \+ of the disadvantages R1, R2, T1 mentioned above. That is why in comput er algebra this is the preferred method to compute with a root of a po lynomial. We can do exact computations with it, we can say exactly whe n an expression equals zero or not, and it is not too big like the rad icals r1,r2,r3. If we later want to switch to another form, floating p oints or radicals, we can always substitute that for u. Even if at the end we want, say, radicals, there are still advantages of using RootO f's during most of the computation and then substituting r1,r2,r3 at t he end. Suppose for example we want to do a certain computation COMP ( e.g. a determinant computation, or a resultant computation) for all ro ots of f. Say we want to compute COMP(r1), COMP(r2), COMP(r3) where CO MP stands for a computation in which the roots of f are used (think of COMP as a Maple procedure). Now it can take a lot of computation time to do COMP(r1), COMP(r2) and COMP(r3) because r1,r2,r3 are big expres sions. It is usually much faster to do: COMP(u). And, if we really did want to have the result in radicals, then we could do: " }}{PARA 0 " " 0 "" {TEXT -1 11 "A:=COMP(u);" }}{PARA 0 "" 0 "" {TEXT -1 43 "seq( s implify(subs(u=i,A)), i=[r1,r2,r3] );" }}{PARA 0 "" 0 "" {TEXT -1 89 " and we obtain the same result, but probably much faster, as COMP(r1), \+ COMP(r2), COMP(r3)." }}{PARA 0 "" 0 "" {TEXT -1 470 "So we see that in some sense the step COMP(u) does the computation for all roots of f, \+ because it did the computation for 1 unspecified root u, which can sti ll be specified later on to each of the roots. But when we have specif ied roots (i.e. roots where we really do say which one it is), like r1 ,r2,r3 or approximations t1,t2,t3 then we have to compute with all thr ee of them because when we do COMP(r1) or COMP(t1) we can't get COMP(r 2) or COMP(t2) by a substitution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 14 "Disadvantages:" }}{PARA 0 "" 0 "" {TEXT -1 579 "U1) u stands for just 1 root, but an unspecified root, of f. A s we've seen this is often enough to handle all roots of f at the same time, but not always. It is enough whenever we only need to compute w ith 1 root of f at a time. Like COMP(r1), COMP(r2), COMP(r3), in there we had a computation that uses only one of the r1,r2,r3 at a time. Bu t if you have a different kind of computation ComP that uses all roots at the same time, say ComP(r1,r2,r3) then it gets harder, then we can 't do that anymore with just u, we would need another root as well. In that case we'd have to do:" }}{PARA 0 "" 0 "" {TEXT -1 15 "u:=RootOf( f,x);" }}{PARA 0 "" 0 "" {TEXT -1 19 "evala(Factor(f,u));" }}{PARA 0 " " 0 "" {TEXT -1 120 "Now take an irreducible factor but not x-r. In th is example we have the factors x-r and a factor of degree 2. Then take :" }}{PARA 0 "" 0 "" {TEXT -1 37 "u2:=RootOf( of that degree 2 factor) ." }}{PARA 0 "" 0 "" {TEXT -1 14 "Then do again:" }}{PARA 0 "" 0 "" {TEXT -1 24 "evala(Factor(f,\{u,u2\}));" }}{PARA 0 "" 0 "" {TEXT -1 206 "Then we get the factors x-u and x-u2, take the root u3 of the rem aining factor which has degree 1. So that root will be some expression in u and u2. This way you do have all three roots of f simultaneously ." }}{PARA 0 "" 0 "" {TEXT -1 142 "In short, disadvantage U1 is the fo llowing: it is hard to do computations using RootOf's when you need mo re than 1 root of f at the same time." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 17 "p-adic solutions:" }}{PARA 0 "" 0 "" {TEXT -1 258 "The solutions v1,v2,v3 do not have disadvantage U1, but \+ they do have disadvantage T1 because we compute the solutions only up \+ to some finite accuracy. However, approximate p-adic solutions are som etimes easier to deal with than approximate complex solutions." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "f;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "u:=RootOf(f,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "evala(Factor(f,u));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "%/(x-u);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "u2:=RootOf(%,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "evala( Factor(f,\{u,u2\}));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "%/( x-u)/(x-u2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "u3:=RootOf( %,x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "(x-u)*(x-u2)*(x-u3 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "evala(Expand(%));" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "7 0 0" 85 } {VIEWOPTS 1 1 0 3 2 1804 }