1. ´ÙÀ½ ºñ¼±Çü ¹æÁ¤½ÄÀÇ ±Ù»çÇظ¦ À̺йýÀ» ÀÌ¿ëÇÏ¿© ã¾Æº¸ÀÚ
nf(x)=x^2-4sin(x)
nÃʱâ: a=1, b=3,tol=10^(-5)
nHint:»ç¿ëÀÚ Á¤ÀÇ ÇÔ¼ö¡®f.m¡¯À» Á¤ÀÇÇÏ¿© »ç¿ëÇØ º¸ÀÚ
2.´ÙÀ½ºñ¼±Çü ¹æÁ¤½ÄÀÇ ±Ù»çÇظ¦Newton¹æ¹ýÀ»ÀÌ¿ëÇÏ¿© ã¾Æº¸ÀÚ
nf(x)=x^2-4sin(x)
nÃʱâ:x (±Ù»çÇØ)=3,tol=10^(-5)
nHint1:¾Õ¿¡¼ »ç¿ëÇß´ø »ç¿ëÀÚÁ¤ÀÇ ÇÔ¼ö¡®f.m¡¯À» »ç¿ëÇÏÀÚ
nHint2: f¡¯(x)=2x-4cos(x)»ç¿ë
3.´ÙÀ½ ºñ¼±Çü ¹æÁ¤½ÄÀDZٻçÇظ¦ÇÒ¼±¹ýÀ»ÀÌ¿ëÇÏ¿© ã¾Æº¸ÀÚ
nf(x)=x^2-4sin(x)
nÃʱâ: x0 (±Ù»çÇØ1)=1, x1 (±Ù»çÇØ2)=3,tol=10^(-5)
n itermax(ÃÖ´ë ¿¬»ê Ƚ¼ö)=100
nHint:¾Õ¿¡¼ »ç¿ëÇß´ø »ç¿ëÀÚ Á¤ÀÇ ÇÔ¼ö¡®f.m¡¯À» »ç¿ëÇÏÀÚ
% À̺йý clear; clc; a=1; % ÃÖÃÊ ±¸°£ ¿ÞÂÊ ³¡ b=3; % ÃÖÃÊ ±¸°£ ¿À¸¥ÂÊ ³¡ tol=10^(-5); % tolerance iter=1; while abs(b-a) > tol m=a+(b-a)/2; % Áß°£ À§Ä¡ ãÀ½ if f(a)*f(m) < 0 % ÇØ°¡ ¿ÞÂÊ ¹Ý¿¡ ÀÖÀ½ b=m; else % ÇØ°¡ ¿À¸¥ÂÊ ¹Ý¿¡ ÀÖÀ½ a=m; end x(iter)=m; iter=iter+1; end iter % ÃÑ iteration ¼ö m f(m) plot(x, '-ro') grid on;
% ´ºÅÏ clear; clc; x=3; % ÃÖÃÊ ±Ù»çÇØ tol=10^(-5); % tolerance iter=1; while abs(f(x)) > tol x=x-f(x)/(2*x-4*cos(x)); xx(iter)=x; iter=iter+1; end iter % ÃÑ iteration ¼ö x f(x) plot(xx, '-ro'); grid on;
% ÇÒ¼±¹ý clear; clc; x0=1; x1=3; tol=10^(-5); % tolerance itermax=100; for i=1:itermax x2=x1-f(x1)*(x1-x0)/(f(x1)-f(x0)); if abs(f(x2)) < tol break; end x0=x1; x1=x2; zz(i)=x2; end i % ÃÑ iteration ¼ö x2 f(x2) plot(zz, '-ro'); grid on;
3°¡Áö Áú¹®¿¡¼ ¹Ø¿¡ »ùÇà Á¦½ÃÇÏ°í ¹®Á¦ Ç®¾î¼ ÄÚµùÇÏ´Â °Çµ¥ µµ¿ò ÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù. |
´Ù¸¥±¸Â÷ÇÑ º¯¸í¾øÀÌ Á÷¼³ÀûÀ¸·Î ¿ë°Ç¸¸ °£´ÜÈ÷ ¹®Á¦¸¸ Á¦½ÃÇϽô ºÐÀΰŠ°°Àºµ¥
¤¾¤¾¤¾ ¿ô°í¸¸ °©´Ï´Ù