MatLab Project 2 - m-File, Bisection Method and Fixed-Point Iteration ( Due February 23) 1. Use the MatLab program for the Bisection Method to solve the follow problems: Page 53: 3(a), 5 - fx x " tan x for x in 0, 4. 5 , 7(b), 10, 11, 18 (extra points). For each equation, you need to update your MatLab function file fun.m. Make sure the current function is being active. Turn in the following: a. the approximation to the solution; b. the function value at the approximation; c. the number of iterations needed. 3(a) fx x 3 " 7x 2 14x " 6, 0, 1 , / 10 "2 n 7, p 7 0. 5859375, fp 7 0. 00103139877319 5. fx x " tan x for x in 0, 4. 5 , / 10 "3 , n 0, a 0 is a solution. 7(b) fx e x " x 2 3x " 2, 0, 1 , / 10 "5 n 17, p 17 0. 25753021240234, fp 17 "2. 759847070876731 10 "7 10. fx x 2 " 3, 1, 2 , / 10 "4 n 14, p 14 1. 73199462890625, fp 14 "1. 946054399013519 10 "4 11. fx x 3 " 25, 1, 3 , / 10 "4 n 15, p 15 2. 92401123046875, fp 15 "1. 669209170813701 10 "4 18. (Extra points) g sinhwt " sinwt 2w 2 dx g w coshwt " w coswt g coshwt " coswt 2w dt 2w 2 g Solve dx | t1 1. 7 for w. fw coshwt " coswt " 1. 7 2w dt xt 20 15 10 a, b "1, 0 w X p 17 "0. 1057 fp 17 2. 4279e " 005 5 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 1 2. Use the MatLab program for the Fixed-point Iteration to solve the following problems: Page 63: 7, 10, 11(b)(c), 12, 15. For each equation, you need to update your MatLab function file gfun.m. Make sure the current function is being active. Let K max 200. Turn in the following: a. the approximation to the solution; b. the number of iterations used. For each of 11(b), 11(c) and 12, compare the number of iterations used and the number of iterations you estimated. 7. gx = 0. 5 sin x , 0, 2= . p 4 3. 62699562243874 2 10. fx x 3 " 25, use g’s which are similar to the ones given in 3.(a)(b)(d). Recall the sequence generated by g in 3(c) diverges. p 0 1, / 10 "4 , 3 25 2. 924 017 738 212 866 07 (a) 25x " 24x x 2 25, 25x 24x 252 , x 1 24x 252 gx , 1, 3 25 x x p 55 2. 92337094856321 3 (b) x " x 3x 2 "x 3 " 25 , x x " x " 225 gx , 1, 3 3x p 8 2. 92401773821287 25 gx , 1, 3 (d) xx 2 25, x 2 25 x x , x p 17 2. 92404167439179 x 52 2, gx 52 2, x x gx has a fixed-point in 1, 4 . 11(b) |g U x | " 103 x Let p 0 2. 5. 103 t 103 0. 64 for x in 2. 5, 4 2. 5 x |p n " p| t 0. 64 n max 2. 5 " 2. 5, 4 " 2. 5 Let N 27. , n 6 5 4 3 1. 50. 64 n 10 "5 "5 n ln0. 64 ln 10 1. 5 7 ln10 "5 " ln1. 5 26. 706 ln0. 64 p 17 2. 69064975842301 2 1 1 2 x3 4 5 – y gx , - - y x 2 x ex 3 e x/2 3 gx 7 gx has a fixed-point in 0, 2 . U 1 2 3 g x 11(c) e x/2 t 1 2 3 6 e 0. 784 7 K 1 5 4 Let p 0 0. By Cor. 24, |p n " p| t K n max 0, 2 " 0 ln0. 7847 n ln 1 2 3 20. 7847 n 10 "5 2 10 "5 , 1 ln 12 10 "5 n 50. 34, N 51 ln0. 7847 0 1 p 15 0. 91000287942203 e x/2 3 12(a) 3x 2 " e x 0, x 0, = 4 gx , 2 2 4 5 0, 2 . Same result as 11(c). = " 2 2 4 "1 and p 0 0. x cos x gx , 2 2 |p n " p| t n ln 3 x – y gx , - - y x 12(b) x " cos x 0, fx x " cos x, f0 f = 4 Let a, b 2 "5 ln 10 =/4 n 2 1. 2 U g x |" sinx | t max 0, = 4 , n " 7. 829 138 10 "2 0 = 4 ln10 "5 " ln = 4 2 ln 2 n 2 2 10 "5 32. 522 273 , N 33. p 30 0. 73908229852240 15. 2 sin=x x 0, 1, 2 , p 0 1. sin=x " 2 " x , 2 x " 2 2 " x 2 sin=x 2 sin=x " 2 , 1 sin "1 =x " 2 sin "1 " x , x = 2 2 2 1.5 1.8 1 1.6 0.5 1.4 0 1.2 1.4 x 1.6 -0.5 1.8 2 1.2 1 1 y 2 sin=x x 1.2 –y 1 = 1.4 x sin "1 " 2x 1.6 1.8 2 2, - - y x p 5 1. 68324099261395 3
© Copyright 2026 Paperzz