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
Simulated annealing wikipedia , lookup
Methods of computing square roots wikipedia , lookup
Compressed sensing wikipedia , lookup
Quartic function wikipedia , lookup
Horner's method wikipedia , lookup
Weber problem wikipedia , lookup
Newton's method wikipedia , lookup
Quiz #2 CSC2800 (Spring Term 2007) Full score: 10 % + 1% bonus Name:_______________________________ (Student ID: ________________________) Problem 1: The values of f(x) at 5 different points are plotted in the above graph. The horizontal line in the graph represents the x-axis. (a) Suppose the False-Position method is used to approximate the zero of f(x), and x1 and x5 are selected as the two initial points. Show the location of the estimated root after one iteration in the graph. You may need a ruler in order to locate the estimated root. [1%] (b) Suppose f(x) is continuous and contains N roots between x1 and x5, and none of the roots is a multiple-root (roots that overlap). What can you say about N besides the fact that N ≥ 1? [1%] N is an odd number. Problem 2: Suppose R is a positive number. When the sequence defined by the iterative formula xn1 xn (2 Rx n ) converges to a non-zero value, what is the value of xn? [2%] When the sequence converges, xn+1 = xn, thus xn1 xn (2 Rx n ) xn xn (2 Rx n ) 1 (2 Rx n ) 0 1 Rx n Rx n 1 xn 1 / R Problem 3: Let f ( x ) x 3 R , where R is a positive number. Based on the Newton-Raphson method, derive the updating formula for finding the zero of f(x). f ( xn ) x R 3x x n R 2 x n R xn n 2 n 2 2 f ' ( xn ) 3x n 3x n 3x n 3 xn1 xn [2%] 3 3 3 Problem 4: Each sequence of numbers in part (a) and (b) represents the errors, ei = xi+1 – xi (i = 1, 2, 3, …), of some converging sequence xi. Estimate the convergent rate of the corresponding sequence. (a) 1.05-1, 1.05-3, 1.05-5, 1.05-7, 1.05-9, …, 1.05-(2i-1), … [1%] log 1.05 ( 2i 1) (2i 1) log 1.05 2i 1 lim lim 1 ( 2 i 1 ) i log 1.05 i ( 2i 1) log 1.05 i 2i 1 Thus the sequence is said to converge linearly. p lim (b) 10, 9, 8, 7, 5, 2, 1, 10-1, 10-2, 10-4, 10-8, 10-16, 10-32, 0 [1%] log 1032 32 log 10 2 log 1016 16 log 10 Thus the sequence is said to converge quadratically. p Problem 5: (a) State an advantage of using the Secant method over the Newton-Raphson method in roots finding. [1%] With the Secant method, there is no need to derive f’(x) directly. (b) State an advantage of using the Bisection method over the Newton-Raphson method in roots finding. [1%] With the Bisection method, there is no need to derive f’(x) directly. With the Bisection method, convergence is guaranteed. Bonus: e1sin x e cos x Find the zero of f ( x ) in [-2, 2] accurate to 8 decimal places. Assume π = 3.141592659. x 2 x 2 e sin x 2 2 2 e1sin x e cos x f ( x) 0 0 e1sin x e cos x 0 e1sin x e cos x 1 sin x cos 2 x 1 sin x 1 sin 2 x 2 sin x x 2x e 2 sin x sin x 0 sin x(sin x 1) 0 sin x 0 or sin x 1 x 0 or x / 2 2 Since f(0) does not exist, the only zero in [-2, 2] is –π / 2 or -1.57079633.