01_hw4

186 days ago by Matthew_Bourque

(L13 ex. 3) Compute the roots of p = (x - c)^d + \epsilon in Sage for
values of c from 1 to 0 for increasing d and decreasing \epsilon, making
sure the working precision is high enough so 1.0 + \epsilon \neq 1.0.
Relate the location of the roots of p to values of c, d, and \epsilon.

def get_prec(eps): prec = 2 one = RealField(prec)(1) while (one == (one + eps)): prec += 1 one = RealField(prec)(1) return prec html("<p>Plot roots of $(x-c)^d - \epsilon$.</p>") html("<p>$c = i/100$</p>") html("<p>$\epsilon = 10^{k}$</p>") @interact def _(i=(0,(0..100)), d=(2,(2..20)), k=(-50,(-100..-1)) ): c = i/100.0 eps = 10^k prec = get_prec(eps) c = RealField(prec)(c) x = polygen(RealField(prec)) p = (x - c)^d + eps html("$(x-%s)^{%s} - %s$" % (c,d,eps)) print "precision = ",prec print "c = ", c print "d = ", d print "epsilon = ", eps L = p.roots(ring=ComplexField(prec)) html(L) points = sum([ point( (real(r[0]), imag(r[0])), size=r[1]*30) for r in L]) show(points) 
       

Plot roots of (x-c)^d - \epsilon.

c = i/100

\epsilon = 10^{k}

Click to the left again to hide and once more to show the dynamic interactive window

 
       

The interactive figure demonstrates that the roots of (x - c)^d + \epsilon for d \in \{2,3, \dots\} are arranged equidistantly on a circle centered at c, and with radius \sqrt[d]{\epsilon}.