You are on page 1of 4

Numerical error = round off error + truncation error

Why measure error :


- To determine the accuracy of numerical results
- To develop stopping criteria for iterative algorithms

Round off error
- Arises because digital computers cannot represent some quantities exactly (due to computer approximation)
- Accuracy : how close to the true value
- Precision : how close to previously value
- Inaccuracy : systematic deviation from the actual value
- Imprecision : magnitude of scatter
Major facets involved in numerical calculations :
- Digital computers have size and precision limits on their ability to represent numbers
- Certain numerical manipulations are highly sensitive to round off errors

Truncation error
- Error that result from using an approximation in place of an exact mathematical procedure (due to
mathematical procedure approximation)
- Taylor Series : provides a means to predict the value of a function at one point in terms of the function value and
its derivatives at another point
o Zero order, first order and nth order

Bracketing methods
- Based on making two initial guesses that bracket the root, that is on either side of the root. Bracket are formed
by finding two guesses where the sign of the function changes. Initial guesses determined by incremental search
method.
- Incremental search method tests the value of the function at evenly spaced intervals and finds brackets by
identifying function sign changes between neighbouring.
- Exception for :
o When the function are tangential to the x axis
o When the function are discontinuous
Bisection method
- Bracketing method in which the interval is always divided in half
Pro Cons
- Easy
- Always convergent
- Can guarantee the error in solution due to
interval gets halved
- Absolute error can be computed
- Slow convergent
- If one initial guess close to root, the
convergence is slower
- Cannot find lower and upper guesses
False position method
- Determine next guesses by connecting the endpoints with a straight line and determining the location of the
intercept of the straight line
- Advantages : faster and always converge for a single root
- Disadvantages : one sideness, one bracketing point will tend to stay fixed

Open method
- Require only a single starting value or two starting values that do not necessarily bracket a root
- May diverge as the computation progress. But when the converge, much faster than bracketing method
Fixed point iteration
- Open method employs a formula to predict the root
Newton Raphson
- A convenience method for function whose derivative can be evaluated analytically
- Advantages : Converge fast, require only one guess
- Disadvantages : divergence at inflection points, oscillations near local max and min, root jumping, division by
zero
Secant method
- A slight variation of Newtons method for function whose derivatives are difficult to evaluate
- Advantages : converge fast, require two initial guesses that do not need to bracket the root
- Disadvantages : division by zero, root jumping

Gauss elimination
- An extension of elimination of unknown method for solving large SLE
- Process consisting of
o Forward elimination of unknowns
Start with first row, add or subtract multiples of the row to eliminates first coefficient from
second row and beyond
Continue to the second row to remove the second coefficient from the third row and beyond
Stop when upper triangular matrix remains
o Back substitution to find solution
Starting with last row, solve the unknown, then substitute the value into the next highest row
Because of the upper triangular nature of the matrix, each row will contain only
one more unknown
- Techniques for improving solutions
o Increase the number of significant figures
o Pivoting
o Scaling

Least square regression
- Modeling of relationship between dependent and independent variables. Finding a curve which represent the
best approximation of a series of data. The curve is the estimate of the trend of dependent variables
- How to find the curve?
o By deriving the function of the curve
o Function can be linear, polynomial and exponential
Linear regression
- Criteria for the best fit
o Minimize the sum of the residual errors for all available data
o Minimize the sum of the absolute values of residual
o Minimax criterion affected by outlier
Polynomial regression
- To minimize the sum of squares of the estimate residuals

Interpolation : data is known to be precise and curve passes all data point
- Curve fitting
o Finding a curve which as the best fit to a series of discrete data
o The curve is the estimate of the trend of the dependent variables
o The curve can be used to determine the intermediate estimate of the data
Polynomial interpolation
- To estimate intermediate values between precise data points
- Easy to evaluate, differentiate and integrate
- Objective :
o To determine the nth order polynomial interpolation for n+1 data point
o To use this polynomial interpolant to calculate the intermediate values
- Example : first order (straight line), second order (quadratic), third order (cubic)
Largrange interpolating polynomial
- A reformulation of the newtons polynomial that avoids the computation of the divided differences
- Objective :
o To determine the nth order polynomial interpolation that passes through n+1 data points
o To calculate the intermediate values
Spline interpolation
- Splines eliminates oscillation by using small subsets of points for each interval rather than every point
- Spline usually provide superior approximation of function that have local, abrupt changes

Newton cotes integration
- The strategy of replacing a complicated function or tabulated data with a polynomial that is easy to integrate
- Derivative : finding velocity of a body for acceleration function, displacement of a body from velocity data
- Integral : finding are under the curves, centroid, moment of inertia, work by variable force, electric charge, force
by liquid pressure
- What can be differentiated and integrated
o Simple continuous function (polynomial, exponential, trigonometry) analytical app
o Tabulated values numerical approach
o Continuous complicated functions numerical approach
- Method
o Trapezoidal rule
o Simpson 1/3 rule
o Simpson 3/8 rule
- More accurate estimate of an integral is obtained if a high-order polynomial is used to connect the point. These
formula that result from taking the integrals under such polynomial called simpsons rule
- Simpson 1/3
o It attains third order accuracy with 3 points rather than the 4 points required for the 3/8 version
o For even number of segments
- Simpson 3/8
o Used in tandem with simpson 1/3 rule when the number of segments is odd
o For odd number of segments

Numerical differentiation
- Function to be integrated are in two forms
o Table of values
o Function
- Three ways to improve derivative estimate using finite divided differences
o Decrease step size
o Use higher order formula
o Use Richardson extrapolation
Romberg integration
- Based on successive application of the trapezoidal rule to attain efficient numerical integrals of functions
- Use Richardson extrapolation to trapezoidal rule
o Uses two estimates of an integral to compute a third and more accurate approximation
Gauss quadrature
- A class of techniques for evaluating the area under a straight line by joining any two points on a curve rather
than simply choosing the end points
- The key is to choose the line that balances the positive an negative errors

You might also like