Chapter 6: Roots (Open Methods)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/57

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

58 Terms

1
New cards

true

(T/F) open methods require only a single starting value or two starting values that do not necessarily bracket the root

2
New cards

true

(T/F) open methods sometimes diverge or move away from the true root

3
New cards

- fixed point iteration
- Newton- Raphson
- Secant
- Modified Secant

open methods include

4
New cards

utilizing fixed point iteration(one point / successive substitution) to get x on the left hand side.

for more on fixed point refer to lecture powerpoint

how do open methods predict a root?

5
New cards

bisection and secant method. It's good because it combines them

Fzero uses

6
New cards
<p>- allows one to predict a new value of x as a function of an old value of x<br><br>Thus, given an initial guess at the root xi , Eq. (6.1) can be used to compute a new estimate xi+1 as expressed by the iterative formula<br><br>&amp; so on<br><br>x(i+2) = g(x(i + 1))</p>

- allows one to predict a new value of x as a function of an old value of x

Thus, given an initial guess at the root xi , Eq. (6.1) can be used to compute a new estimate xi+1 as expressed by the iterative formula

& so on

x(i+2) = g(x(i + 1))

what is the advantage of fixed point iteration?

7
New cards
term image

approximate relative error is given by this formula

8
New cards
<p>the approximate percent relative error is halved after each iteration</p>

the approximate percent relative error is halved after each iteration

fixed point iteration has linear convergence and can be proved by

9
New cards
<p>- separating the equation into two components and then graphing the components separately and seeing where they intersect. <br><br>- just graph the original function and see where it intersects the x axis</p>

- separating the equation into two components and then graphing the components separately and seeing where they intersect.

- just graph the original function and see where it intersects the x axis

two alternative graphical methods for determining the root of an equation are

10
New cards
<p>the intersection of the two components of the equation (it's the same thing as the root of the function) (denoted by red circle)<br><br>-- idk if abscissa will always be the root!</p>

the intersection of the two components of the equation (it's the same thing as the root of the function) (denoted by red circle)

-- idk if abscissa will always be the root!

what is an abscissa

11
New cards
<p>For the first case (Fig. 6.3a), the initial guess of x0 is used to determine the corresponding point on the y2 curve [x0, g(x0)]. The point [x1, x1] is located by moving left horizontally to the y1 curve. These movements are equivalent to the first iteration of the fixed-point method:<br>x1 = g(x0)<br>Thus, in both the equation and in the plot, a starting value of x0 is used to obtain an esti- mate of x1. The next iteration consists of moving to [x1, g(x1)] and then to [x2, x2].</p>

For the first case (Fig. 6.3a), the initial guess of x0 is used to determine the corresponding point on the y2 curve [x0, g(x0)]. The point [x1, x1] is located by moving left horizontally to the y1 curve. These movements are equivalent to the first iteration of the fixed-point method:
x1 = g(x0)
Thus, in both the equation and in the plot, a starting value of x0 is used to obtain an esti- mate of x1. The next iteration consists of moving to [x1, g(x1)] and then to [x2, x2].

fixed point iteration graphically

12
New cards

|g′(x)| < 1.

Convergence for fixed point iteration occurs when

13
New cards
term image

fixed point iteration convergence

14
New cards
term image

fixed point iteration divergence

15
New cards

decrease with each iteration

for fixed point iteration, if |g′| < 1 , the errors

16
New cards

grow

for fixed point iteration, if |g′| > 1, the error

17
New cards
<p>positive, and hence the errors will have the same sign (a and c)</p>

positive, and hence the errors will have the same sign (a and c)

If for fixed point iteration, the derivative is positive, the errors will be

18
New cards
<p>change sign on each iteration (b and d)</p>

change sign on each iteration (b and d)

If for fixed point iteration, the derivative is negative, the errors will

19
New cards
<p>if the initial guess of the root is xi , a tangent can be extended from the point [xi , f (xi )]. The point where this tangent crosses the x axis usually represents an improved estimate of the root.</p>

if the initial guess of the root is xi , a tangent can be extended from the point [xi , f (xi )]. The point where this tangent crosses the x axis usually represents an improved estimate of the root.

Newton Raphson method

20
New cards
term image

for the newton raphson method, The first derivative at x is equivalent to the slope ... which can be rearranged to ..

21
New cards

no. Well, the percent relative error at each iteration decreases much faster for newton than fixed

usually is the fixed point iterative method faster than the newton raphson method?

22
New cards

proportional to the square

for newton raphson method, the error should be roughly ..... of the previous error

NOTE: the number of significant figures of accuracy approximately doubles with each iteration

23
New cards

is exhibited by newton raphson method because the error is roughly proportional to the square of the previous error... this means the number of significant figures of accuracy approximately doubles with each iteration

quadratic convergence

24
New cards
term image

example of slow convergence using newton raphson method

25
New cards
<p>* multiple roots<br><br><b> when the first guess is in a region where the slope is near zero (so first iteration flings solution far away!! so it takes time to converge back in on it (</b>nature of the function basically*) -- figure on left <br><br>* (figure a) inflection point (f'(x) = 0) occurs in the vicinity of a root, causing the iterations to diverge from the root. So slow when root is at an inflection point<br><br>* (figure b) illustrates the tendency of the Newton-Raphson technique to oscillate around a local maximum or minimum. Such oscillations may persist, or, as in Fig. 6.6b, a near-zero slope is reached whereupon the solution is sent far from the area of interest. <br><br>* (fig C) encountering near zero slopes (disaster cause a derivative of 0 causes division by 0)<br><br>* (fig d) tangent line shoots off horizontally. never hitting the x axis</p>

* multiple roots

when the first guess is in a region where the slope is near zero (so first iteration flings solution far away!! so it takes time to converge back in on it (nature of the function basically*) -- figure on left

* (figure a) inflection point (f'(x) = 0) occurs in the vicinity of a root, causing the iterations to diverge from the root. So slow when root is at an inflection point

* (figure b) illustrates the tendency of the Newton-Raphson technique to oscillate around a local maximum or minimum. Such oscillations may persist, or, as in Fig. 6.6b, a near-zero slope is reached whereupon the solution is sent far from the area of interest.

* (fig C) encountering near zero slopes (disaster cause a derivative of 0 causes division by 0)

* (fig d) tangent line shoots off horizontally. never hitting the x axis

when is there slow convergence for newton raphson method? (4)

26
New cards

true. its convergence depends on the nature of the function and on the accuracy of the initial guess.

(T/F) There is no general convergence criterion for Newton-Raphson

27
New cards
<p>when derivatives are hard to evaluate, so use the backward finitde divided difference</p>

when derivatives are hard to evaluate, so use the backward finitde divided difference

when can the secant method be used?

28
New cards
<p>uses the finite divided difference and two arbitrary initial guesses <br><br>used when derivatives are hard to evaluate</p>

uses the finite divided difference and two arbitrary initial guesses

used when derivatives are hard to evaluate

secant method

29
New cards

because f(x) is not required to change signs between the estimates

why is the secant method not considered a bracketing method?

30
New cards
<p>a fractional perturbation of the independent variable to estimate f'(x)<br><br>where sigma is a small perturbation fraction.</p>

a fractional perturbation of the independent variable to estimate f'(x)

where sigma is a small perturbation fraction.

instead of using arbitrary initial guesses for the secant method, what can you do

31
New cards
<p>a small perturbation fraction is used instead of two arbitrary initial guesses</p>

a small perturbation fraction is used instead of two arbitrary initial guesses

modified secant method

32
New cards
term image

modified secant method example

33
New cards

the perturbation might not be a proper value. It sigma is too small, the method can be swamped by round-off error caused by subtractive cancellation in the denominator of Eq. (6.9). If it is too big, the technique can become inefficient and even divergent. How- ever, if chosen correctly, it provides a nice alternative for cases where evaluating the derivative is difficult and developing two initial guesses is inconvenient.

what are possible errors that come with the modified secant method

34
New cards

hybrid approach that combined the reliability of bracketing with the speed of the open methods

chooses when to use which

didn't read this section (6.4) page 163

brent's mehod

35
New cards
<p>used to find the real root of a single equation. <br><br>takes in the function and an initial guess (open method) <br><br>or two guesses in a vector can also be passed. <br><br><br>(another card tells you more specifics)</p>

used to find the real root of a single equation.

takes in the function and an initial guess (open method)

or two guesses in a vector can also be passed.


(another card tells you more specifics)

fzero()

36
New cards

the guess that you need to pass needs to be a guess near the root. for example x^2 - 9 has two roots, so if you pass 0 it'll give you -3, if you pass 4, 3.

for fzero function, wat is a disadvantage,

37
New cards

it first performs a search to identify a sign change. This search differs from the incremental search described in Section 5.3.1, in that the search starts at the single initial guess and then takes increasingly bigger steps in both the positive and negative directions until a sign change is detected.

Then it does the fast methods (secant and inverse quadratic interpolation) unless an unacceptable result occurs (root estimate falls outside bracket), then bracketing method occurs.

once it finds an acceptable root (or gets closer to the root) it switches to the faster methods. Bisection typically dominates at first, but then switches to the other

how does the fzero function work if a single initial guess is passed,

38
New cards

secant and inverse quadratic interpolation

fast root finding methods

39
New cards
<p>[x,fx] = a vector containing the root x and the function evaluated at the root fx, options is a data structure created by the optimset function, and p1, p2... are any parameters that the function requires. Note that if you desire to pass in parameters but not use the options, pass an empty vector [] in its place.</p>

[x,fx] = a vector containing the root x and the function evaluated at the root fx, options is a data structure created by the optimset function, and p1, p2... are any parameters that the function requires. Note that if you desire to pass in parameters but not use the options, pass an empty vector [] in its place.

fzero syntax

40
New cards
term image

optimest function spills out all the data that occurred during the fzero function

41
New cards

bisection method and newton raphson method

for polynomials, which root finding method is utile for finding a single root

42
New cards

roots function

if we want to find all the roots of a polynomial, what do we use

43
New cards
<p>x is a column vector containing the roots and c is a row vector containing the polynomial coefficients</p>

x is a column vector containing the roots and c is a row vector containing the polynomial coefficients

roots function syntax

44
New cards
<p>treats it as an eigenvalue problem<br><br>creates a companion matrix by dividing the all the coefficients by the first coefficient then placing them in a matrix with 1s and 0s. The companion matrix has a useful property that its eigenvalues are the roots of the polynomial. <br><br>after it makes the matrix, it uses matlab's eigenvalue evaluation function to determine the roots of the polynomial.</p>

treats it as an eigenvalue problem

creates a companion matrix by dividing the all the coefficients by the first coefficient then placing them in a matrix with 1s and 0s. The companion matrix has a useful property that its eigenvalues are the roots of the polynomial.

after it makes the matrix, it uses matlab's eigenvalue evaluation function to determine the roots of the polynomial.

how does the roots function work

45
New cards

poly() function

inverse function of roots function is

46
New cards
<p>when passed the values of the roots, it returns the polynomial's coefficients. <br><br>where r is a column vector containing the roots and c is a row vector containing the polynomial's coefficients.</p>

when passed the values of the roots, it returns the polynomial's coefficients.

where r is a column vector containing the roots and c is a row vector containing the polynomial's coefficients.

poly() function

47
New cards
term image

example, finding roots of polynomial. using polyval(), poly(), roots(), and deconv()

(1/3)

48
New cards
term image

(2/3)

49
New cards
term image

(3/3)

50
New cards

- combines reliability of bracketing with speed of open methods.

- chooses when to do which.

for bracketing method uses bisection and for open methods uses secant method or inverse quadratic interpolation

Brent's method

51
New cards

secant method is sometimes referred to as such because the lines that connects the two guesses is used to estimate the new root estimate by observing where it crosses the x axis

linear interpolation method

52
New cards
<p>determining a sideways quadratic function that goes through 3 points and observing where it intersects the x axis<br>the point where it intersects the x axis will be used as the new root estimate<br><br>y = 0 corresponds to the root x(i+1)<br><br><b>this equation finds the root</b></p>

determining a sideways quadratic function that goes through 3 points and observing where it intersects the x axis
the point where it intersects the x axis will be used as the new root estimate

y = 0 corresponds to the root x(i+1)

this equation finds the root

inverse quadratic interpolation

53
New cards
<p>the parabola might not intersect the x axis (when the parabola has complex roots)<br><br>so inverse quadratic interpolation was created to switch the axis and make a sideways graph</p>

the parabola might not intersect the x axis (when the parabola has complex roots)

so inverse quadratic interpolation was created to switch the axis and make a sideways graph

what is the flaw with quadratic interpolation not inverse

54
New cards
<p>inverse quadratic interpolation is better as seen in the picture</p>

inverse quadratic interpolation is better as seen in the picture

comparing inverse quadratic interpolation vs secant

55
New cards
term image

inverse quadratic interpolation example

56
New cards
term image

reversing x and y in this equation will yield a quadratic in x

57
New cards
term image

quadratic in y is made using this equation

58
New cards
<p>If the three y values are not distinct (i.e., yi-2 = yi-1 or yi-1 = yi), an inverse quadratic function does not exist.<br><br>If we arrive at a situation where the y values are not distinct, we can always revert to the less efficient secant method to generate a root using two of the points. If yi 2 yi 1, we use the secant method with xi-1 and xi. If yi-1 yi, we use xi-2 and xi-1.</p>

If the three y values are not distinct (i.e., yi-2 = yi-1 or yi-1 = yi), an inverse quadratic function does not exist.

If we arrive at a situation where the y values are not distinct, we can always revert to the less efficient secant method to generate a root using two of the points. If yi 2 yi 1, we use the secant method with xi-1 and xi. If yi-1 yi, we use xi-2 and xi-1.

when does inverse quadratic interpolation not work