SlideShare a Scribd company logo
Mymensingh Engineering College
Department of Computer Science & Engineering
Course Name: Numerical Methods Lab
Course Code: CSE-3212
Submitted by:
Name: Md. Shakil Anower Samrat
Roll: 307
Reg No: 2850
Batch: CSE-3rd
Session: 2019-20
Submitted to:
Bidhan Krisna Roy
Lecture, Department of CSE
Mymensingh Engineering College
Submission Date:
Signature:
Index
Course: Numerical Methods Lab
Code: CSE-3212
SL Experiment Name Date Signature
1 Study Of Bisection Method
2 Study of False Position Method
3 Study of Newton Raphson
Method
4 Study of Secant Method
5 Study of the Gauss Elimination
Method
6 Study of the Linear Regression
Method
7 Study of Trapezoidal Rule
8 Study of the Simpson’s Rule
9 Study of the Runge Kutta
Method
Experiment No. 1
Experiment Name: Study of Bisection Method.
Objective: The major goal of this exercise is to examine and comprehend the
Bisection Method, a numerical approach for determining the roots of a real-valued
function. Participants in this study want to acquire knowledge into the method's iterative
character, investigate its convergence behavior, and improve their ability to use the
Bisection Method to solve basic equations.
Theory: The Bisection Method is a root-finding algorithm that operates on
continuous functions. Given an interval [a, b] where the function f(x) changes sign, the
Bisection Method iteratively narrows down the interval containing the root until a
sufficiently accurate approximation is obtained. The steps of the method are as follows:
Algorithm: Bisection method can be easily programmed using the following
computational method:
1. Initial Interval:
 Start with an initial interval [a, b] where f(a) and f(b) have opposite signs,
indicating that the root lies within the interval.
2. Midpoint Calculation:
 Calculate the midpoint c of the interval: c=
a+b
2
3. Sign Analysis:
 Determine the sign of f(c) and replace either a or b with c such that the
new interval [a, b] still contains the root.
4. Iteration:
 Repeat the process iteratively, narrowing down the interval in each step
until the desired level of accuracy is achieved.
Code/Program:
Output:
Discussion:
Advantages of the bisection method:
1) The bisection approach converges in all cases. The method is guaranteed to
converge because it brackets the root.
1) The interval is cut in half as the iterations are carried out. Thus, it is possible to
ensure that the equation's answer contains an error.
Disadvantages of bisection method:
1) Because the bisection approach is reliant on half the gap, its convergence is
sluggish.
2) It will require more iterations to get to the root if one of the first estimates is closer to
the actual root.
Experiment No. 2
Experiment Name: Study of False Position Method.
Objective: The primary objective of this experiment is to investigate and comprehend
the False Position Method as a numerical technique for finding the roots of a real-
valued function. The experiment aims to provide participants with a practical
understanding of the method's iterative process, convergence characteristics, and its
application to solve equations.
Theory: The False Position Method, also known as the Regula Falsi method, is an
iterative root-finding algorithm similar to the Bisection Method, it operates on an interval
[a, b] where the function f(x) changes sign. The steps of the method include:
Algorithm: False Position method can be programmed using the following
computational steps:
1. Initial Interval:
 Begin with an initial interval [a,b] where f(a) and f(b) have opposite signs,
indicating the presence of a root in the interval.
2. Linear Interpolation:
 Interpolate the next approximation c using linear interpolation based on
the points (a, f(a)) and (b, f(b)):
 c=
af (b)−bf (a)
f (b)−f (a)
3. Sign Analysis:
 Determine the sign of f(c) and update the interval [a, b] such that it still
contains the root.
4. Iteration:
 Repeat the process iteratively, adjusting the interval and updating the
approximation until the desired level of accuracy is achieved.
The False Position Method offers faster convergence than the Bisection Method, but
careful consideration of the function's behaviour is required to avoid convergence
issues.
Code/Program:
Output:
Discussion:
Advantages of False Position Method:
1) The computation of the derivative is not necessary.
2) This approach is linearly convergent, meaning it has a first order rate of convergence.
It converges in all cases.
Disadvantages of the False Position Method:
1) Since this method relies on trial and error, it can occasionally take a long time to
compute the correct root, which slows down the procedure.
2) It is applied to the computation of a single equation's unknown.
Experiment No. 3
Experiment Name: Study of Newton Raphson Method.
Objective: The primary objective of this experiment is to comprehensively study the
Newton-Raphson Method as a numerical technique for finding the roots of a real-
valued function. Participants aim to gain a practical understanding of the method's
iterative nature, convergence characteristics, and the factors influencing its
effectiveness in solving equations.
Theory: The Newton-Raphson Method is an iterative root-finding algorithm that
utilizes the derivative of a real-valued function to approximate its roots. Given an initial
guess 0
𝑥 x0, the method iteratively refines the approximation using the formula:
xn+1 = xn −
f (xn)
f '(xn)
where:
 xn+1 is the next approximation of the root.
 xn is the current approximation of the root.
 f ¿) is the function value at xn.
 f ' (xn) is the derivative of the function at xn.
Algorithm: Newton Raphson method can be programmed using the following
computational steps:
Step 1: Find points a & b, such that a<b and f (a)⋅ f (b)<0.
Step 2: Take the interval [a,b] and find next value x0=
a+b
2
.
Step 3: Find f (x0) & f '
( x¿¿0)¿. Then determine,
x1=x0−
f (x0)
f
'
(x0)
Step 4: If f (x1)=0, then x1 is an exact root;
Else x0=x1.
Step 5: Repeat steps 3 & 4 until f (xi)=0 or, |f (xi)|≤accuracy.
Code/Program:
Output:
Discussion:
Advantages of Newton Raphson Method:
1) One of the quickest approaches that gets to the root immediately.
2) Converges quadratically on the root, meaning that the rate of convergence is 2.
3) The number of significant digits roughly doubles with each step as we get closer to
the root.
4) Simple to translate into various dimensions.
Drawbacks of Newton Raphson Method:
1) Newton Raphson's slow convergence rate and potential for hundreds of repetitions
around a critical point are its primary drawbacks.
2) To apply this strategy, we need to find the derivative.
3) Unsatisfactory features of global convergence.
Experiment No: 4
Experiment Name: Study of Secant Method.
Objective:
The primary objective of this experiment is to conduct a comprehensive study of the
Secant Method as a numerical technique for finding the roots of a real-valued
function. Participants aim to gain practical insights into the method's iterative process,
convergence characteristics, and its application to solving equations, particularly in
cases where the derivative is not readily available.
Theory:
The Secant Method is an iterative root-finding algorithm that approximates the roots of a
real-valued function using a finite difference quotient. Given two initial guesses xn−1
and xn the method iteratively refines the approximation using the formula:
xn+1=xn −
f (xn).(xn−xn−1 ​)
f (xn)−f (xn−1)
where:
 xn+1 is the next approximation of the root.
 xn andxn−1 are the current and previous approximations of the root.
 and f (xn) and f (xn− 1) are the function values at xnand xn−1, respectively.
Algorithm: Second method can be easily programmed using the following
computational method:
1. Input:
 f(x): The function.
 xn−1and xn Initial guesses.
 TOL: Tolerance.
2. Iteration:
 While ∣ f (xn) >
∣ TOL:
 Calculate xn+1=xn −
f (xn).(xn−xn−1 ​)
f (xn)−f (xn−1)
 Update xn−1=¿ xn , xn=¿ xn+1
 Increment n
3. Output:
 Final xn when ∣ f (xn) ≤
∣ TOL or after a set number of iterations.
Code/Program:
Output:
Discussion:
Advantages of Secant Method:
(1) The secant approach converges more quickly than the bisection and regular falsi
methods.
(2) Rather of relying just on the approximations that bind the interval to encompass the
root, it finds additional approximations using the two most recent approximations of the
root.
Disadvantages of Secant Method:
(1) Because there is no guarantee of convergence, we should set a maximum number
of iterations while using this method on a computer. If at any stage of iteration this
method fails.
(3) When using a computer to implement this method, we need set a maximum
restriction on the number of repetitions because convergence is not guaranteed.

More Related Content

PPTX
REGULA FALSI METHOD numerical methods
PDF
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...
PDF
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
PDF
Chapter 2 solving nonlinear equations
PDF
Numerical Study of Some Iterative Methods for Solving Nonlinear Equation.pdf
PPTX
ROOT OF NON-LINEAR EQUATIONS
PDF
A04410107
PDF
Lecture 04 newton-raphson, secant method etc
REGULA FALSI METHOD numerical methods
A Comparison Of Iterative Methods For The Solution Of Non-Linear Systems Of E...
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
Chapter 2 solving nonlinear equations
Numerical Study of Some Iterative Methods for Solving Nonlinear Equation.pdf
ROOT OF NON-LINEAR EQUATIONS
A04410107
Lecture 04 newton-raphson, secant method etc

Similar to Numerical Methods Lab - Shakil Anower Samrat (20)

PPTX
Numerical Techniques
PDF
Adv. Num. Tech. 1 Roots of function.pdf
PPTX
Quantitive Techniques: Bisection method
PDF
Numerical method for solving non linear equations
PDF
Chapter two
PPT
Newton Raphson Method.ppt
PPTX
Nams- Roots of equations by numerical methods
PDF
CME NOTE.pdfhbbbbjjjbhjhgjhgkhghghjfhcfkck
PPT
Bisection method
DOCX
Roots of equations
DOCX
Equations root
PPTX
Lecture 2_2 False Position Method.pptx
PPT
Mws gen nle_ppt_bisection
PPTX
Numerical solutions of algebraic equations
PDF
Lecture_06_roots_English.pdf
DOCX
MolinaLeydi_FinalProject
PDF
Methods of calculate roots of equations
PPTX
ROOTS OF NON LINEAR FUNCTION (BISECTION AND NEWTON RAPHSON).pptx
PPT
Bisection and fixed point method
PPTX
A NEWTON RAPHSON METHOD for class project
Numerical Techniques
Adv. Num. Tech. 1 Roots of function.pdf
Quantitive Techniques: Bisection method
Numerical method for solving non linear equations
Chapter two
Newton Raphson Method.ppt
Nams- Roots of equations by numerical methods
CME NOTE.pdfhbbbbjjjbhjhgjhgkhghghjfhcfkck
Bisection method
Roots of equations
Equations root
Lecture 2_2 False Position Method.pptx
Mws gen nle_ppt_bisection
Numerical solutions of algebraic equations
Lecture_06_roots_English.pdf
MolinaLeydi_FinalProject
Methods of calculate roots of equations
ROOTS OF NON LINEAR FUNCTION (BISECTION AND NEWTON RAPHSON).pptx
Bisection and fixed point method
A NEWTON RAPHSON METHOD for class project
Ad

More from Softsasi (12)

PPTX
Near Field Communication (NFC) Protocols
PPTX
Sky Math Quest Game Project Presentation
PDF
Axel Game Project report by Softsasi- Shakil Anower Samrat
PDF
SkyMath Quest: Redefining Math Education Through Gaming
PPTX
SkyMath Quest: Redefining Math Education Through Gaming
PPTX
Devsphere Hackathon 2025 Season 1: Software Development
PPTX
Artificial Intelligence-Advantages and disadvantages of AI
PDF
Everything about Special Discrete Distributions
PPTX
Musafir-A Third-person shooter game
PDF
Geography of Bangladesh -Shakil Anower Samrat
PDF
What is the Parliamentary System of Bangladesh Explain the 3 Organs of the Go...
PPTX
Java Swing Presentation-Shakil Anower Samrat
Near Field Communication (NFC) Protocols
Sky Math Quest Game Project Presentation
Axel Game Project report by Softsasi- Shakil Anower Samrat
SkyMath Quest: Redefining Math Education Through Gaming
SkyMath Quest: Redefining Math Education Through Gaming
Devsphere Hackathon 2025 Season 1: Software Development
Artificial Intelligence-Advantages and disadvantages of AI
Everything about Special Discrete Distributions
Musafir-A Third-person shooter game
Geography of Bangladesh -Shakil Anower Samrat
What is the Parliamentary System of Bangladesh Explain the 3 Organs of the Go...
Java Swing Presentation-Shakil Anower Samrat
Ad

Recently uploaded (20)

PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPT
introduction to datamining and warehousing
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PPTX
Fundamentals of Mechanical Engineering.pptx
PDF
Abrasive, erosive and cavitation wear.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPT
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
PDF
PPT on Performance Review to get promotions
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
Categorization of Factors Affecting Classification Algorithms Selection
Nature of X-rays, X- Ray Equipment, Fluoroscopy
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
introduction to datamining and warehousing
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
R24 SURVEYING LAB MANUAL for civil enggi
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Fundamentals of Mechanical Engineering.pptx
Abrasive, erosive and cavitation wear.pdf
Safety Seminar civil to be ensured for safe working.
Fundamentals of safety and accident prevention -final (1).pptx
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
A5_DistSysCh1.ppt_INTRODUCTION TO DISTRIBUTED SYSTEMS
PPT on Performance Review to get promotions

Numerical Methods Lab - Shakil Anower Samrat

  • 1. Mymensingh Engineering College Department of Computer Science & Engineering Course Name: Numerical Methods Lab Course Code: CSE-3212 Submitted by: Name: Md. Shakil Anower Samrat Roll: 307 Reg No: 2850 Batch: CSE-3rd Session: 2019-20 Submitted to: Bidhan Krisna Roy Lecture, Department of CSE Mymensingh Engineering College Submission Date: Signature:
  • 2. Index Course: Numerical Methods Lab Code: CSE-3212 SL Experiment Name Date Signature 1 Study Of Bisection Method 2 Study of False Position Method 3 Study of Newton Raphson Method 4 Study of Secant Method 5 Study of the Gauss Elimination Method 6 Study of the Linear Regression Method 7 Study of Trapezoidal Rule 8 Study of the Simpson’s Rule 9 Study of the Runge Kutta Method Experiment No. 1
  • 3. Experiment Name: Study of Bisection Method. Objective: The major goal of this exercise is to examine and comprehend the Bisection Method, a numerical approach for determining the roots of a real-valued function. Participants in this study want to acquire knowledge into the method's iterative character, investigate its convergence behavior, and improve their ability to use the Bisection Method to solve basic equations. Theory: The Bisection Method is a root-finding algorithm that operates on continuous functions. Given an interval [a, b] where the function f(x) changes sign, the Bisection Method iteratively narrows down the interval containing the root until a sufficiently accurate approximation is obtained. The steps of the method are as follows: Algorithm: Bisection method can be easily programmed using the following computational method: 1. Initial Interval:  Start with an initial interval [a, b] where f(a) and f(b) have opposite signs, indicating that the root lies within the interval. 2. Midpoint Calculation:  Calculate the midpoint c of the interval: c= a+b 2 3. Sign Analysis:  Determine the sign of f(c) and replace either a or b with c such that the new interval [a, b] still contains the root. 4. Iteration:  Repeat the process iteratively, narrowing down the interval in each step until the desired level of accuracy is achieved. Code/Program:
  • 5. Discussion: Advantages of the bisection method: 1) The bisection approach converges in all cases. The method is guaranteed to converge because it brackets the root. 1) The interval is cut in half as the iterations are carried out. Thus, it is possible to ensure that the equation's answer contains an error. Disadvantages of bisection method: 1) Because the bisection approach is reliant on half the gap, its convergence is sluggish. 2) It will require more iterations to get to the root if one of the first estimates is closer to the actual root.
  • 6. Experiment No. 2 Experiment Name: Study of False Position Method. Objective: The primary objective of this experiment is to investigate and comprehend the False Position Method as a numerical technique for finding the roots of a real- valued function. The experiment aims to provide participants with a practical understanding of the method's iterative process, convergence characteristics, and its application to solve equations. Theory: The False Position Method, also known as the Regula Falsi method, is an iterative root-finding algorithm similar to the Bisection Method, it operates on an interval [a, b] where the function f(x) changes sign. The steps of the method include: Algorithm: False Position method can be programmed using the following computational steps: 1. Initial Interval:  Begin with an initial interval [a,b] where f(a) and f(b) have opposite signs, indicating the presence of a root in the interval. 2. Linear Interpolation:  Interpolate the next approximation c using linear interpolation based on the points (a, f(a)) and (b, f(b)):  c= af (b)−bf (a) f (b)−f (a) 3. Sign Analysis:  Determine the sign of f(c) and update the interval [a, b] such that it still contains the root. 4. Iteration:  Repeat the process iteratively, adjusting the interval and updating the approximation until the desired level of accuracy is achieved. The False Position Method offers faster convergence than the Bisection Method, but careful consideration of the function's behaviour is required to avoid convergence issues.
  • 8. Discussion: Advantages of False Position Method: 1) The computation of the derivative is not necessary. 2) This approach is linearly convergent, meaning it has a first order rate of convergence. It converges in all cases. Disadvantages of the False Position Method: 1) Since this method relies on trial and error, it can occasionally take a long time to compute the correct root, which slows down the procedure. 2) It is applied to the computation of a single equation's unknown.
  • 9. Experiment No. 3 Experiment Name: Study of Newton Raphson Method. Objective: The primary objective of this experiment is to comprehensively study the Newton-Raphson Method as a numerical technique for finding the roots of a real- valued function. Participants aim to gain a practical understanding of the method's iterative nature, convergence characteristics, and the factors influencing its effectiveness in solving equations. Theory: The Newton-Raphson Method is an iterative root-finding algorithm that utilizes the derivative of a real-valued function to approximate its roots. Given an initial guess 0 𝑥 x0, the method iteratively refines the approximation using the formula: xn+1 = xn − f (xn) f '(xn) where:  xn+1 is the next approximation of the root.  xn is the current approximation of the root.  f ¿) is the function value at xn.  f ' (xn) is the derivative of the function at xn. Algorithm: Newton Raphson method can be programmed using the following computational steps: Step 1: Find points a & b, such that a<b and f (a)⋅ f (b)<0. Step 2: Take the interval [a,b] and find next value x0= a+b 2 . Step 3: Find f (x0) & f ' ( x¿¿0)¿. Then determine, x1=x0− f (x0) f ' (x0) Step 4: If f (x1)=0, then x1 is an exact root; Else x0=x1. Step 5: Repeat steps 3 & 4 until f (xi)=0 or, |f (xi)|≤accuracy.
  • 11. Discussion: Advantages of Newton Raphson Method: 1) One of the quickest approaches that gets to the root immediately. 2) Converges quadratically on the root, meaning that the rate of convergence is 2. 3) The number of significant digits roughly doubles with each step as we get closer to the root. 4) Simple to translate into various dimensions. Drawbacks of Newton Raphson Method: 1) Newton Raphson's slow convergence rate and potential for hundreds of repetitions around a critical point are its primary drawbacks. 2) To apply this strategy, we need to find the derivative. 3) Unsatisfactory features of global convergence.
  • 12. Experiment No: 4 Experiment Name: Study of Secant Method. Objective: The primary objective of this experiment is to conduct a comprehensive study of the Secant Method as a numerical technique for finding the roots of a real-valued function. Participants aim to gain practical insights into the method's iterative process, convergence characteristics, and its application to solving equations, particularly in cases where the derivative is not readily available. Theory: The Secant Method is an iterative root-finding algorithm that approximates the roots of a real-valued function using a finite difference quotient. Given two initial guesses xn−1 and xn the method iteratively refines the approximation using the formula: xn+1=xn − f (xn).(xn−xn−1 ​) f (xn)−f (xn−1) where:  xn+1 is the next approximation of the root.  xn andxn−1 are the current and previous approximations of the root.  and f (xn) and f (xn− 1) are the function values at xnand xn−1, respectively. Algorithm: Second method can be easily programmed using the following computational method: 1. Input:  f(x): The function.  xn−1and xn Initial guesses.  TOL: Tolerance. 2. Iteration:  While ∣ f (xn) > ∣ TOL:  Calculate xn+1=xn − f (xn).(xn−xn−1 ​) f (xn)−f (xn−1)  Update xn−1=¿ xn , xn=¿ xn+1  Increment n
  • 13. 3. Output:  Final xn when ∣ f (xn) ≤ ∣ TOL or after a set number of iterations. Code/Program: Output:
  • 14. Discussion: Advantages of Secant Method: (1) The secant approach converges more quickly than the bisection and regular falsi methods. (2) Rather of relying just on the approximations that bind the interval to encompass the root, it finds additional approximations using the two most recent approximations of the root. Disadvantages of Secant Method: (1) Because there is no guarantee of convergence, we should set a maximum number of iterations while using this method on a computer. If at any stage of iteration this method fails. (3) When using a computer to implement this method, we need set a maximum restriction on the number of repetitions because convergence is not guaranteed.