Numerical Method Lab Quiz
Numerical Method Lab Quiz
Bracketing Method:
The bracketing method is a class of numerical methods for finding
the root of a function f(x), where f(x)=0. It works by starting with
two initial guesses, a and b, such that f(a) and f(b) have opposite
signs (f(a)⋅f(b)<0), ensuring that there is at least one root in the
interval [a, b]. The interval is iteratively reduced until it converges
to the root.
Bisection Method:
(binary chopping or half interval method)
1. Description:
• A simple bracketing method that divides the interval [a, b]
into two equal parts.
• The midpoint c is calculated as: c = (a + b)/2
• Depending on the sign of f(c) the root lies in either [a, c] or [c,
b] and the interval is updated accordingly.
• Iteration continues until the interval width or ∣f(c)∣ is less
than a specified tolerance.
2. Key Characteristics:
• Always converges to a root, provided f(a)⋅f(b)<0.
• Convergence is guaranteed but relatively slow, with an order
of convergence of 1 (linear).
False Position (Regula Falsi) Method:
1. Description:
• Similar to the bisection method but uses a weighted
average to choose the next point based on the function
values.
• The new point c is calculated as:
Opening Method:
An opening method is a class of numerical techniques for finding
the root of a function f(x), where f(x)=0. Unlike bracketing
methods, which require an initial interval enclosing the root,
opening methods start with one or two initial guesses and do not
necessarily require f(a)⋅f(b)<0. These methods iterate based on
approximations to reduce the error, often converging faster than
bracketing methods but at the cost of less reliability.
Secant Method:
1. Description:
• The secant method uses two initial guesses, x1 and x2,
and approximates the function f(x) by a secant line (a
straight line passing through two points on the function
curve).
• The formula for the next approximation:
Newton-Raphson Method:
1. Description:
• The Newton-Raphson method uses one initial guess x0
and iteratively approximates the root by using the
tangent line of the function at each point.
• The formula for the next approximation:
Measurement of Errors:
Gauss Elimination Method:
Gaussian elimination is a method for solving a system of linear
equations, finding the rank of a matrix, or computing the inverse
of a matrix. It transforms a given matrix into an upper triangular
form using row operations.
Gauss-Jordan Elimination:
Gauss-Jordan elimination is an extension of Gaussian elimination
that transforms the matrix into a reduced row echelon form
(RREF), where the matrix becomes diagonal with all diagonal
elements equal to 1.
AX=B
Here, A=LU
LUX=B
Let, UX=Y
LY=B
This method can be solved in O(1) time complexity:
Ordinary Differential Equations:
An Ordinary Differential Equation (ODE) is a type of equation that
contains one independent variable and one dependent variable
and at least one of its derivatives w.r.t. independent variable.
Runge-Kutta (RK) Method:
The RK method is a family of iterative methods used To
approximate the solutions of ODEs. The 4th-order Runge-Kutta
method (RK4) is the most commonly used and provides a good
balance between accuracy and computational efficiency.
This is the graph of (dy/dx = 2x+1)
Newton Forward and Backward Interpolation:
Interpolation is the technique of estimating the value of a function
for any intermediate value of the independent variable, while the
process of computing the value of the function outside the given
range is called extrapolation.
This formula is useful when the value of f(x) is required near the
end of the table.
Time Complexity: O(n^2) since there are two nested loops to fill
the forward difference table and an additional loop to calculate
the interpolated value.
Space Complexity: O(n^2), as the forward and backward difference
table is stored in a two-dimensional array with n rows and n
columns.
Lagrange Interpolation:
Lagrange Interpolation Formula finds a polynomial called
Lagrange Polynomial that takes on certain values at an arbitrary
point. It is an nth-degree polynomial expression of the function
f(x). The interpolation method is used to find the new data points
within the range of a discrete set of known data points.
Numerical Integration:
Numerical integration is a mathematical technique used to
approximate the definite integral of a function over a specified
interval. The definite integral of a function represents the area
under its graph, and it provides information about the total change
in the dependent variable over a given interval. The importance of
numerical integration lies in its ability to estimate the values of
definite integrals for functions that cannot be expressed in closed-
form. This makes it a powerful tool for solving real-world problems
that involve continuous change, such as the calculation of area,
volume, work, and the analysis of physical systems.
Curve Fitting:
Curve fitting is the process of constructing a curve (or a
mathematical function) that best fits a set of data points. It is
widely used in data analysis, engineering, and science to model
relationships, predict outcomes, and interpret patterns.