CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A Using shift solve function of my calculator and putting the nearest value of x equals to -1, I assume that my expected value for the equation is -1.067. 2. Let y= cos (2x)-x/2 1st iteration: x1 = -2, y1 = 0.346 x2 = -1, y2 = 0.84 𝑥𝑟 = −1 − xr = -0.681 y1 (yr) = (Focus on root in between -2.0 and -1.0) 0.84(−2 − (−1)) 0.346 − (0.84) Thus, yr = 0.548 0.190> 0 ; the root lies in between x2 and xr CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A 2nd iteration: x1 = -0.681, x2 = -1, 𝑥𝑟 = −1 − y2 = 0.84 0.84(−0.681 − (−1)) 0.548 − (0.84) xr = -1.058 y1 (yr) = y1 = 0.548 Thus, yr =0.011 0.006> 0 ; the root lies in between x2 and xr 3rd iteration: x1 = -1.058, x2 = -1, 𝑥𝑟 = −1 − y2 = 0.84 0.84(−1.058 − (−1)) 0.011 − (0.84) xr = -1.066 y1 (yr) = y1 = 0.011 Thus, yr =0.001 0.00001> 0 ; the root lies in between x2 and xr 4th iteration: x1 = -1.066, x2 = -1, 𝑥𝑟 = −1 − y2 = 0.84 0.84(−1.066 − (−1)) 0.001 − (0.84) xr = -1.067 y1 (yr) = y1 = 0.001 Thus, yr =0.000 0.00001> 0 ; the root lies in between x2 and xr SUMMARY OF FPM ON ROOT BETWEEN -2 AND -1 Iteration 𝑥1 𝑦1 𝑥2 𝑦2 𝑥𝑟 𝑦𝑟 𝑦1 𝑦𝑟 1.000 -2.000 0.346 -1.000 0.084 -0.681 0.548 0.190 2.000 -0.681 0.548 -1.000 0.084 -1.058 0.011 0.006 3.000 -1.058 0.011 -1.000 0.084 -1.066 0.001 0.00001 4.000 -1.066 0.001 -1.000 0.084 -1.067 0.000 0.000 ROOT 2= -1.067 ROOT = -1.067 CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A Again, using shift solve function of my calculator and putting the nearest value of x equals to -2, I assume that my expected value for the equation is -1.798. Let y= cos (2x)-x/2 1st iteration: x1 = -3, x2 = -2, 𝑥𝑟 = −2 − xr = -1.836 y1 (yr) = y1 = 2.460 y2 = 0.346 0.346(−3 − (−2)) 2.460 − (0.346) Thus, yr = 0.056 0.137> 0 ; the root lies in between x2 and xr 2nd iteration: x1 = -1.836, x2 = -2, 𝑥𝑟 = −2 − xr = -1.805 y1 (yr) = 0.346(−1.836 − (−2)) 0.056 − (0.346) Thus, yr = 0.010 0.137> 0 x2 = -2, 𝑥𝑟 = −2 − y1 (yr) = y1 = 0.056 y2 = 0.346 ; the root lies in between x2 and xr 3rd iteration: x1 = -1.805, xr = -1.799 (Focus on root in between -3.0 and -2.0) y1 =0.010 y2 = 0.346 0.346(−1.805 − (−2)) 0.010 − (0.346) Thus, yr = 0.0020 0.00002> 0 ; the root lies in between x2 and xr CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A 4th iteration: x1 = -1.799, x2 = -2, 𝑥𝑟 = −2 − y2 = 0.346 0.346(−1.799, −(−2)) 0.002 − (0.346) xr = -1.798 y1 (yr) = y1 = yr = 0.0020 Thus, yr = 0.00 0.0000> 0 ; the root lies in between x2 and xr SUMMARY OF FPM ON ROOT BETWEEN -3 AND -2 𝑥1 Iteration 𝑦1 𝑥2 𝑦2 𝑥𝑟 𝑦𝑟 𝑦1 𝑦𝑟 1.000 -3.000 2.460 -2.000 0.346 -1.836 0.056 0.137 2.000 -1.836 0.056 -2.000 0.346 -1.805 0.010 0.001 3.000 -1.805 0.010 -2.000 0.346 -1.799 0.002 0.00002 4.000 -1.799 0.002 -2.000 0.346 -1.798 0.000 0.000 ROOT 2= -1.798 ROOT = -1.798 Again, using shift solve function of my calculator and putting the nearest value of x equals to 1, I assume that my expected value for the equation is 0.626. Let y= cos (2x)-x/2 1st iteration: x1 = 0, x2 = 1, 𝑥𝑟 = −1 − xr = 0.522 y1 (yr) = y1 = 1 (Focus on root in between 0 and 1.0) y2 = -0.916 −0.916(−0 − (1)) 1 − (−0.916 ) Thus, yr = 0.242 0.242> 0 ; the root lies in between x2 and xr CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A 2nd iteration: x1 = 0.522, x2 = 1, 𝑥𝑟 = −1 − y2 = -0.916 −0.916(0.522 − (1)) 0.242 − (−0.916) xr = 0.622 y1 (yr) = y1 =0.242 Thus, yr = 0.010 0.003> 0 ; the root lies in between x2 and xr 3rd iteration: x1 = 0.622, x2 = 1, 𝑥𝑟 = −1 − y2 = -0.916 −0.916(0.622 − (1)) 0.010 − (−0.916) xr = 0.626 y1 (yr) = y1 =0.010 Thus, yr = 0.0002 0.000002> 0 ; the root lies in between x2 and xr SUMMARY OF FPM ON ROOT BETWEEN 0 AND 1 Iteration 𝑥1 𝑦1 𝑥2 𝑦2 𝑥𝑟 𝑦𝑟 𝑦1 𝑦𝑟 1.000 0.000 1.000 1.000 -0.916 0.522 0.242 0.242 2.000 0.522 0.242 1.000 -0.916 0.622 0.010 0.003 3.000 0.622 0.010 1.000 -0.916 0.626 0.0002 0.000002 ROOT 2= 0.626 ROOT = 0.626 CARDENAS, RICO JAY B. ID No. 19-22711 2. Using Newton-Raphson Method (NRM) For my initial guess I will use -2 to be the value of x to find the real root Solution: Plot the function f(x) = Cos(2x)-x/2 2. Determine the first derivative the function y = Cos(2x)-x/2 y’= -2 Sin (2x)-1/2 Perform NRM 1st iteration: try 𝑥1 = -2.0 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = −2 − . 346 −2.014 Therefore 𝒙𝟐 = -1.828 BSCE-3A CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A 2nd iteration: try 𝑥1 = -1.828 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = −1.828 − 0.043 −1.484 Therefore 𝒙𝟐 = -1.799 3rd iteration: try 𝑥1 = -1.799 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = −1.799 − 0.002 −1.381 Therefore 𝒙𝟐 = -1.798 SUMMARY OF NRM iteration X1 f(x1) f'(x) X2 %Error 1 -2.000 0.346 -2.014 -1.828 1.309 2 -1.828 0.043 -1.484 -1.799 0.032 3 -1.799 0.002 -1.381 -1.798 -0.015 Therefore, the real roots for the equation f(x)= Cos(2x)-x/2 Using NRM method is -1.789 CARDENAS, RICO JAY B. ID No. 19-22711 SOLVING FOR THE 2ND ROOT For my initial guess I will use -1.2 to be the value of x to find the real root 1. Determine the first derivative the function y = Cos(2x)-x/2 y’= -2 Sin (2x)-1/2 Perform NRM 1st iteration: try 𝑥1 = -1.20 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = −1.2 − −.137 . 851 Therefore 𝒙𝟐 = -1.039 2nd iteration: try 𝑥1 = -1.039 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = −1.039 − −.034 1.249 Therefore 𝒙𝟐 = -1.066 BSCE-3A CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A 3rd iteration: try 𝑥1 = -1.066 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = −1.066 − −.001 1.192 Therefore 𝒙𝟐 = -1.067 SUMMARY OF NRM iteration X1 f(x1) f'(x) X2 %Error 1 -1.200 -0.137 0.851 -1.039 2.668 2 -1.039 0.034 1.249 -1.066 0.091 3 -1.066 0.001 1.193 -1.067 0.031 Therefore, the real roots for the equation f(x)= Cos(2x)-x/2 Using NRM method is -1.067 CARDENAS, RICO JAY B. ID No. 19-22711 SOLVING FOR THE 3rD ROOT For my initial guess I will use 0.3 to be the value of x to find the real root 1. Determine the first derivative the function y = Cos(2x)-x/2 y’= -2 Sin (2x)-1/2 Perform NRM 1st iteration: try 𝑥1 = .30 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = .30 − . 675 −1.629 Therefore 𝒙𝟐 = .714 2nd iteration: try 𝑥1 = .714 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = .714 − −.216 −2.48 Therefore 𝒙𝟐 = .627 BSCE-3A CARDENAS, RICO JAY B. ID No. 19-22711 BSCE-3A 3rd iteration: try 𝑥1 = .627 y = Cos(2x)-x/2 y’ =-2 Sin (2x)-1/2 For 𝑥2 𝑥2 = .627 − −.003 −2.401 Therefore 𝒙𝟐 = .626 SUMMARY OF NRM iteration X1 f(x1) f'(x) X2 %Error 1 0.300 0.675 -1.629 0.714 14.137 2 0.714 -0.216 -2.480 0.627 0.228 3 0.627 -0.003 -2.401 0.626 0.028 Therefore, the real roots for the equation f(x)= Cos(2x)-x/2 Using NRM method is 0.626