View the step-by-step solution to:

For this homework, we are going to consider the straightforward problem of applying Newton's method to nding the roots of the simple third-order...

Please explain How I am able to solve this problem.

Screen Shot 2018-04-03 at 11.01.52 AM.pngScreen Shot 2018-04-03 at 11.02.05 AM.png

Screen Shot 2018-04-03 at 11.01.52 AM.png

For this homework, we are going to consider the straightforward problem of applying Newton's method to finding the roots of the simple third-order polynomial 1:3 — 1. For this
simple polynomial we lmow there are three roots, one of which by inspection is l. The other
two are complex numbers whose cube is also 1: the two numbers {—1 :l: fijflfl have this
property, which you can {and should} verify in Matlab. Newton’s method for finding one of these roots consists of iteratively improving an initial
guess a by repeatedly applying the rule _ 23 —1
3r:2 until lea — 1| is suficiently small; we'll use 11]"5 as a tolerance level for this homework. Since the roots are generally complex, so too might be e. Newton’s method works
perfectly well for complex values of a, but we must he sure to do the complex-valued
arithmetic properly. As we saw on LEG, Il:i'++ won't do this for us natively, and we will
need to implement the rules for complex subtraction, multiplication, and division manually.
[Integer powers are just repeated multiplication, so those are implicitly covered in the rules
we practiced this week}. Remember that mixing real and complex arithmetic is easily
accomplished by treating any real number as a complex with zero imaginary part {so 1
is really 1 + 03‘ and 3 is really 3 + flj in the equation above} Finally note that for the
absolute value in the convergence test, you need to use the definition ofthe absolute value
[magnitude] of a complex number. Now, since we already know what the roots of this polynomial are, you might wonder
why we would go through the trouble of writing a program to I[at best approximately) find
one. It turns out that there is a fascinating, indeed fractal, geometric figure hiding in the
Newton calculations for this problem. Barring pathological choices of initial guess for e [and it is possible for Newton to diverge
for a very poor initial guess}, any initial guess will converge to one of the three roots. The
question is: which one? Theoretically, and experimentally, initial guesses in a connected
region of the complex plane "surrounding"I one of the three roots will converge to the nearest
one. But what about regions of the plane that are approximately equidistant from two or
more roots? These might converge equally well to any of the roots, and the boundaries between points which converge to different roots can be very complex [and non-obvious},
resulting in a beautiful fractal structure it visualised graphically. i=2 So that‘s what we want to do with our program. We want it to accept as an input the
choice of initial guess for a. After Newton's metlrod has converged to a root, we want the
program to "graphically"I describe the root to which the initial guess has converged. For
this, we‘ll assign a color corresponding to each of the three roots, "red“l for the root at 1, “green” for the root at. {—1 + veins, and “blue” for the root at [—1 — isms.
A. sample run of your program should look as shown at the top of the following page:

Screen Shot 2018-04-03 at 11.02.05 AM.png

Initial guess (real and mag}: -1 fl {Enter}- Initial guess a I -1 ccnvergen te red met. Initial guess (real and imagll‘. -.1 .1 {Enter} Initial guess a I -fl.1 + [Llj cenverges to green reet.
Initial gliesa (real and inagll: .25 .43 {Enter}
Initial guess 2 I fl.25+fl.43j converges tc: blue rent.
Initial geese (real and iuag]: e u (Enter:- DK - dune! Hate that the cede doesn’t just run Newton‘s methed fer a single initial g'uem1 but keeps
asking fer neu.r initial guesses and reperting the “rent mler” that it cenysrges to until yen
enter I] I] fer the initial guess. Your" cede will need tc: use a ceuple while leeps and cenditienals to de all its werlr. Just
like in Matlah, yen can "'nlrat'El while leaps inside ef ether while leaps. er nest eenditienals inside of leeps. leaps inside ef cenditienals, etc. NDTE: If yen had yeur pregranr test an extremely large number ef initial guesses, and
then drew a figure with each peint in the eernpleir plane celered aecerding tn the scheme alzuerlre1 yen wenld get the fractal figure helew knewn as a “Julia set”. {The brightness
1warlatiens within the celers ef this figure is an indicatien ef hew many Newten iteratiens
it tee}: te cenyerge tn the indicated rent.) See if yen can lecate the three referenes cases
abcwe in this diagram [which is centered en the erigin ef the plane]!

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question