{"id":257944,"date":"2025-07-17T18:42:23","date_gmt":"2025-07-17T18:42:23","guid":{"rendered":"https:\/\/learnexams.com\/blog\/?p=257944"},"modified":"2025-07-17T18:42:26","modified_gmt":"2025-07-17T18:42:26","slug":"write-a-matlab-code-for-fixed-point-iteration-method-using-aitken-steffensen-acceleration-procedure","status":"publish","type":"post","link":"https:\/\/www.learnexams.com\/blog\/2025\/07\/17\/write-a-matlab-code-for-fixed-point-iteration-method-using-aitken-steffensen-acceleration-procedure\/","title":{"rendered":"Write a MATLAB code for fixed point iteration method using Aitken Steffensen acceleration procedure"},"content":{"rendered":"\n<p>Write a MATLAB code for fixed point iteration method using Aitken Steffensen acceleration procedure. Steffensen&#8217;s Method is a combination of fixed-point iteration and the Aitken&#8217;s 42 method: Suppose we have a fixed point iteration: Po; P1 = g (po). P2 = g (p1 ). Once we have po, P1 and p2, we can compute (P1 Po)4 po = Po P2 2p1 + Po At this point we &#8216;restart&#8221; the fixed point iteration with po 5 Po, e.g. p3 = po. P4 = g(p3) . p5 = g (pa). and compute (pa p3)2 p3 = p3 p5 2p4 + p3<\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-0-color\">The Correct Answer and Explanation is:<\/mark><\/strong><\/p>\n\n\n\n<p>Here&#8217;s a MATLAB code implementing the fixed-point iteration method using Steffensen&#8217;s acceleration procedure:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">matlabCopyEdit<code>% Steffensen's Method for Fixed-Point Iteration\n\n% Function for fixed-point iteration\ng = @(x) (x^2 + 1)^(1\/2); % Example function: g(x) = sqrt(x^2 + 1)\n\n% Initial guess\np0 = 1.0;\n\n% Tolerance and maximum iterations\ntolerance = 1e-6;\nmax_iter = 100;\n\n% Initialize iteration variables\niter = 0;\np0_vals = p0;\nerror = Inf;\n\nwhile error &gt; tolerance &amp;&amp; iter &lt; max_iter\n    % Fixed-point iterations\n    p1 = g(p0);\n    p2 = g(p1);\n    \n    % Steffensen's method\n    p_new = p0 - ((p1 - p0)^2) \/ (p2 - 2*p1 + p0);\n    \n    % Error calculation\n    error = abs(p_new - p0);\n    \n    % Update the guess for next iteration\n    p0 = p_new;\n    p0_vals = [p0_vals, p0]; % Store iteration values\n    \n    % Increment iteration counter\n    iter = iter + 1;\nend\n\n% Display results\ndisp('Steffensen Method Results:');\ndisp(['Root: ', num2str(p0)]);\ndisp(['Iterations: ', num2str(iter)]);\ndisp(['Final Error: ', num2str(error)]);\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Explanation:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Fixed-Point Iteration:<\/strong> The general idea of fixed-point iteration is to iterate the equation pn+1=g(pn)p_{n+1} = g(p_n)pn+1\u200b=g(pn\u200b), where g(x)g(x)g(x) is a function chosen to express the root of the equation.<\/li>\n\n\n\n<li><strong>Steffensen&#8217;s Method:<\/strong> This method accelerates the fixed-point iteration by applying Aitken&#8217;s delta-squared process. After computing p1p_1p1\u200b and p2p_2p2\u200b from the fixed-point iteration, the new approximation pnewp_{\\text{new}}pnew\u200b is computed as: pnew=p0\u2212(p1\u2212p0)2p2\u22122p1+p0p_{\\text{new}} = p_0 &#8211; \\frac{(p_1 &#8211; p_0)^2}{p_2 &#8211; 2p_1 + p_0}pnew\u200b=p0\u200b\u2212p2\u200b\u22122p1\u200b+p0\u200b(p1\u200b\u2212p0\u200b)2\u200b This formula helps improve convergence speed, reducing the number of iterations required to reach a sufficiently accurate approximation of the root.<\/li>\n\n\n\n<li><strong>Loop until Convergence:<\/strong> The loop continues until the error (absolute difference between the new and old approximations) is less than the set tolerance or the maximum number of iterations is reached.<\/li>\n\n\n\n<li><strong>Performance:<\/strong> Steffensen&#8217;s method significantly speeds up convergence compared to basic fixed-point iteration, especially when the function has a slowly converging fixed-point. The process is often faster, needing fewer iterations to achieve a desired precision.<\/li>\n\n\n\n<li><strong>Result Display:<\/strong> Once the loop completes, the final root, iteration count, and error are displayed.<\/li>\n<\/ol>\n\n\n\n<p>You can modify the function g(x)g(x)g(x) as per your problem. The given example uses g(x)=x2+1g(x) = \\sqrt{x^2 + 1}g(x)=x2+1\u200b, but any function where the fixed-point iteration is applicable can be used.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/learnexams.com\/blog\/wp-content\/uploads\/2025\/07\/learnexams-banner6-848.jpeg\" alt=\"\" class=\"wp-image-257945\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Write a MATLAB code for fixed point iteration method using Aitken Steffensen acceleration procedure. Steffensen&#8217;s Method is a combination of fixed-point iteration and the Aitken&#8217;s 42 method: Suppose we have a fixed point iteration: Po; P1 = g (po). P2 = g (p1 ). Once we have po, P1 and p2, we can compute (P1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25],"tags":[],"class_list":["post-257944","post","type-post","status-publish","format-standard","hentry","category-exams-certification"],"_links":{"self":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts\/257944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/comments?post=257944"}],"version-history":[{"count":0,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts\/257944\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/media?parent=257944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/categories?post=257944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/tags?post=257944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}