0% found this document useful (0 votes)
6 views

Numerical Lab Report 1

numerical lab report

Uploaded by

emondhaka485
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Numerical Lab Report 1

numerical lab report

Uploaded by

emondhaka485
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Dept.

of
Electrical & Electronic Engineering
Lab. Report on

EEE 2206: NUMERICAL METHODS &


STATISTICS IN ENGINEERING SESSIONAL

Student Name: Iftiar Rahman Emon

Student ID: 211136

Experiment No: 01
Exp. Name: Solution to non-linear equation using Bisection Method.

Date of Experiment: 29-06-2024


Date of Submission: 15-09-2023

Course Teacher: Md. Rabiul Islam


Lecturer, EEE, JUST
Comments:

JASHORE UNIVERSITY OF SCIENCE & TECHNOLOGY


Jashore-7408, Bangladesh
Experiment No: 01
Experiment Name: Solution to non-linear equation using Bisection
Method.

1. Objectives: To implement the bisection method in MATLAB and C programming to


find the root of a given nonlinear equation.

2. Theory:
Bisection Method:
The bisection method is a numerical root-finding algorithm that works by repeatedly
dividing an interval in half. It assumes that the function is continuous over the interval
and changes sign at the endpoints. The method iteratively narrows down the interval until
the desired accuracy is achieved.The method is shown graphically below

Figure 1.1 Graphical representation of the bisection method.


3.Steps:

Input Parameters:

1. Function Definition: The user is prompted to enter the nonlinear function in symbolic
form.
2. Initial Guesses: The user is asked to input the initial guesses for the interval, a and b,
where the function changes sign.
3. Number of Iterations: The user specifies the maximum number of iterations to be
performed.
4. Tolerance: The user defines the desired tolerance for the root.

Bisection Method Algorithm:

1. Check for Initial Interval Validity:


o Verify if the function changes sign between a and b. If not, display an error
message indicating that the bisection method cannot be applied.
2. Iteration Loop:
o For each iteration:
1. Calculate the midpoint c of the interval.
2. Print the root for the current iteration.
3. Check for convergence:
▪ If the absolute difference between c and b or c and a is less than
the tolerance, the root is found, and the loop breaks.
4. Update the interval:
▪ If the function changes sign between a and c, set b to c.
▪ Otherwise, set a to c.
4.MATLAB Script Code:
5.Output:

6.Discussion:
The MATLAB code demonstrates the bisection method to find the root of the nonlinear equation
f(x) = x2+ 2x - 2. We input the function, initial guesses, maximum iterations, and tolerance. The
bisection method iteratively divides the interval containing the root in half until the desired
accuracy is achieved. The output shows the root approximations at each iteration. The final
calculated root is 0.7324, which is within the specified tolerance.

You might also like