Docsity

implementing iteration method in c, Lab Reports of Numerical Methods in Engineering

Partial preview of the text

Download implementing iteration method in c and more Lab Reports Numerical Methods in Engineering in PDF only on Docsity!

Southern University

Report Name : Numerical Methods Lab Report 1

Subject Name : Numerical methods Lab

Course Code : CS- 2104

Submitted By : Submitted To : Name : Md. Alauddin Maisha Maimuna ID : 006- 37 - 11 Lecturer, CSE Dept. : CSE Southern University Remarks Computer Science & Engineering Spring 2020

Objectives:  Implement iteration method using C/C++ to find the root of the equation x^3 + x^2 – 1 = 0 up to 3 decimal places. Description of Iteration Method: In computational mathematics, an iterative method is a mathematical procedure that uses an initial guess to generate a sequence of improving approximate solutions for a class of problems, in which the n - th approximation is derived from the previous ones. A specific implementation of an iterative method, including the termination criteria, is an algorithm of the iterative method. An iterative method is called convergent if the corresponding sequence converges for given initial approximations. A mathematically rigorous convergence analysis of an iterative method is usually performed; however, heuristic-based iterative methods are also common. Algorithm  Step 1: Given an equation f(x)=  Step 2: convert f(x)=0 into the form of x=g(x)  Step 3: Let the initial guess be 0.5/3.2 , Do, xi+1=g(xi) While (none of the convergence iteration is matched) Let the given equation be f(x) = 0 and the value of x to be determined. By using the Iteration method you can find the roots of the equation. To find the root of the equation first we have to write equation like below x = pi(x) Let x=x 0 be an initial approximation of the required root α then the first approximation x 1 is given by x 1 = pi(x0).

Screenshot of Output: Conclusion: The output of the program is matched with the result which was done manually using iteration method. Thus, we can find the root of the equation x^3 + x^2 – 1 = 0 up to 3 decimal places with iteration method using C programming.