Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Big O notation wikipedia , lookup
Law of large numbers wikipedia , lookup
History of the function concept wikipedia , lookup
Halting problem wikipedia , lookup
Non-standard calculus wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Proofs of Fermat's little theorem wikipedia , lookup
Vincent's theorem wikipedia , lookup
CS371/AM242 Winter 2016 Practice Finding Roots 1. Consider the following problem: The sum of two numbers is 20. Add each number to its square root, and multiply together. The product of the two sums is approximately 155.55. a) Define a function f(x) such that finding a root of f(x) solves the above problem. You may assume x is a number between 1 and 9, inclusive. b) Write Matlab code to find a root of your function f(x)=0 using the NewtonRaphson method. Continue the iterations until abs(f(x)) <= 10-6. Include a table of the iterate values, when starting from x0=1, x0=9, and a third x0 of your choice. c) Without implementating the bisection algorithm: i. Prove that [1,9] is an appropriate initial bracket for a root of f. ii. Determine the approximate number of iterations required by the bisection algorithm to find the interval [ak,bk] of length <= 10-6. 2. Consider the function f(x) = x4+2x2-x-3. a) Show that a fixed point of π(π₯) = β (π₯+3βπ₯ 4 ) 2 is a root of f. b) Write Matlab code to calculate the first 20 iterates for a root of f, starting from x0 = 1, using xk+1 = g(xk). Print out the iterates. What do you observe about the values? 3π₯ 4 +2π₯ 2 +3 c) Show that a fixed point of β(π₯) = 4π₯ 3 +4π₯β1 is a root of f. d) Write Matlab code to calculate the first 20 iterates for a root of f, starting from x0 = 1, using xk+1 = h(xk). Print out the iterates. What do you observe about the values? How does this compare to the performance of g? 1 1 3. Consider the sequence {xk} where π₯π+1 = 2 π₯π + π₯ , used to generate a fixed point of 1 1 π the function π(π₯) = 2 π₯ + π₯. a) Using the convergence results for fixed point algorithms, show that limπββ π₯π = β2 when starting with x0>β2. (Verify that the conditions for convergence as discussed in class apply to g on the interval [β2, β). ) b) Determine the order of convergence q and the asymptotic error constant Ξ» for this sequence, assuming the result from a) is true, where q and Ξ» were defined in class (see Slide 19 from Module 02 slides, as posted on LEARN). Show your workings. 1