P. 1
Numerical Methods Reviewer

|Views: 5|Likes:
methods
methods

See more
See less

12/19/2015

pdf

text

original

Numerical methods are techniques by which mathematical problems are reformulated so that they can be solved with arithmetic

operations. Numerical methods are characterized by large numbers of tedious arithmetic calculations. HOW ENGINEERS APPROACH PROBLEM SOLVING BEFORE THE COMPUTER ERA: 1. Uses Analytical or Exact Methods - Applicable for only limited class of problems (e.g. Linear Model, Simple Geometry, Low Dimensionality, etc) 2. Graphical Solutions - Can be used to solve complex problems but results are not very precise and less dimensionality. Without the aids of computer, it becomes tedious and awkward to implement. 3. Calculators and Slide Rules - Calculations are still tedious and slow even because it is still manual. SIGNIFICANCE OF NUMERICAL METHODS: 1. Numerical methods are extremely powerful problemsolving tools and will they greatly enhance your problemsolving skills. 2. If you are conversant with numerical methods and are adept at computer programming, you can design your own programs to solve problems. 3. Numerical methods provide a vehicle for you to reinforce your understanding of mathematics because one function of numerical methods is to reduce higher mathematics to basic arithmetic operations. “COMPUTER ARE PRACTICALLY USELESS WITHOUT A FUNDAMENTAL UNDERSTANDING OF HOW ENGINEERING SYSTEMS WORK.” What are Generalizations? Generalizations can serve as organizing principles that can be employed to synthesize observations and experimental results into a coherent and comprehensive framework from which conclusions can be drawn. Generalizations, in engineering problem-solving perspective, it is expressed in the form of a mathematical model. Mathematical Model defined as a formulation or equation that expresses the essential features of a physical system or process in mathematical terms. Dependent variable: Characteristic that usually reflects the state of the system Independent variables: Dimensions such as time and space along which the systems behavior is being determined Parameters: reflect the system’s properties or composition Forcing functions: external influences acting upon the system NEWTON’S SECOND LAW OF MOTION States that “the time rate change of momentum of a body is equal to the resulting force acting on it.” NEWTON’S SECOND LAW OF MOTION States that “The acceleration produced by a particular force acting on a body is directly proportional to the magnitude of the force and inversely proportional to the mass of the body.” INTERPRETATION: It can be seen that the numerical method (Approximate) captures the essential features of the exact solution. However, because straight-line segments is employed, there are some discrepancies between the two results. One way to minimize such discrepancies is to use a smaller step size. PART I: BASICS OF COMPUTER PROGRAMMING & SOFTWARE

Computer – give ease in calculating for extremely laborious and time-consuming solutions to problems than by hand. What can the computer provide you with? 1. Software Packages – capable of doing the basic and standard way of computations. 2. Programming – extends the capability of the software packages by writing programs run by them Computer Programs - set of instructions that direct the computer to perform a certain task. Structured Programming - set of rules that prescribe good style habits for the programmer. - Well-structured algorithms are invariably easier to debug and test, resulting in programs that take a shorter time to develop, test, and update. Forms of Programming Structuring: 1. Flowchart - visual or graphical representation of an algorithm - employs a series of blocks which represent a particular operation or step in the algorithm and arrows which represent sequence of algorithm. - useful in planning, unraveling, or communicating the logic of your own or someone else's program Terminal- Represents the beginning or end of a program Flowlines- Represent the flow of logic. The humps on the horizontal arrow indicated that it passes over and does not connect with the vertical flowlines. Process- Represents calculation or data manipulations Input/Output – Represent inputs and outputs of data information. Decision – Represents a comparison, question that determines alternative paths to be followed. Junction- Represent the confluence of flowlines. Off-Page Connector – Represents a break a that is continued on another page. Count Controlled Loop – User for loops which repeat a prespecified number of iterations 2. Pseudocode - uses code-like statements in place of the graphical symbols of the flowchart. - bridges the gap between flowcharts and computer code - easier to use to develop a program than with a flowchart Fundamental Control Structures (Logical Representation): 1. Sequence - computer code is implemented one instruction at a time (unless directed altered by the user) 2. Selection - provides a means to split the program's flow into branches based on the outcome of a logical condition. Cascade - chain of decisions Case - branching is based on the value of a single test expression 3. Repetition - provides a means to implement instructions repeatedly (loops). a. Decision Loop – terminates based on the result of a logical condition. i. DOEXIT (Break Loop) – structure repeats until a logical condition is true. ii. DOFOR (Count-controlled Loop) – performs a specified number of repetitions or iterations. Modular Programming - approach which divides the computer program into small subprograms, or modules, that can be developed and tested separately. - makes a subprogram independent and self-contained to do a specific and defined function with one entry and exit point. - 50-100 instructions in length Procedures - representation of modules in high-level languages - series of computer instructions that together perform a given task Excel - spreadsheet which is a special type of mathematical software that allow the user to enter and perform calculations on rows and columns of data

- has some built-in numerical capabilities including equation solving, curve fitting, and optimization. - includes VBA as a macro language that can be used to implement numerical calculations. - has several visualization tools, such as graphs and threedimensional surface plots, that serve as valuable adjuncts for numerical analysis. MATLAB - flagship software product of The MathWorks, Inc., which was cofounded by the numerical analysts Cleve Moler and John N. Little. - originally developed as a matrix laboratory - has a variety of functions and operators that allow convenient implementation of many of the numerical methods APPROXIMATIONS AND ROUNDING-OFF ERRORS Approximation - representation of something that is not exact, but still close enough to be useful. Significant Figures - developed to formally designate the reliability of a numerical value. - are the numbers that can be used with confidence. - correspond to the number of certain digits plus one estimated digit. Identifying Significant Digits 1. All non-zero digits are considered significant. EX: 91 has two significant digits (9 and 1) 123.45 has five significant digits (1, 2, 3, 4 and 5). 2. Zeros appearing between two non-zero digits are significant. EX: 101.12 has five significant digits: 1, 0, 1, 1 and 2. 3. Leading zeros are not significant. EX: 0.00052 has two significant digits: 5 and 2. 4. Trailing zeros in a number containing a decimal point are significant. EX: 12.2300 has six significant digits: 1, 2, 2, 3, 0 and 0 0.000 122 300 still has only six significant digits 130.00 has five significant digits. 5. Zeros used to place value is insignificant unless a dot is included EX: 50 has 1 significant digit 50. has 2 significant digit Importance of Understanding Significant Figures in Numerical Math 1. Important when deciding the acceptability of an approximation to a certain number of significant figures. 2. Important since computers cannot express a value with infinite number. Accuracy and Precision Accuracy - refers to how closely a computed or measured value agrees with the true value. Precision - refers to how closely individual computed or measured values agree with each Other Inaccuracy - aka Bias, defined as systematic deviation from the truth. Imprecision - aka Uncertainty, refers to the magnitude of the scatter. Error - represents both the inaccuracy and imprecision of predictions. - arise from the use of approximations to represent exact mathematical operations and Quantities Major Forms of Numerical Errors: 1. Round-off Error - due to the fact that computers can represent only quantities with finite number of digits. - discrepancy introduced by the omission of significant figures 2. Truncation -discrepancy introduced by the fact that numerical methods may employ approximations to represent exact mathematical operations and quantities CHALLENGE OF NUMERICAL METHODS: Determining the error estimates in the absence of knowledge regarding the true value. SOLUTION TO THE CHALLENGE: Iterative approach is used to compute the answers The process is performed repeatedly, or iteratively, to successively compute better and better approximations FLOATING POINT - Represent s fractional quantities in computers

- Composed of the mantissa (significand), base of the number system and exponent (mbe) NUMBER SYSTEM - convention for representing quantities Base - number used as the reference for constructing the system Place Value - determines the position and magnitude of a digit or symbol TRUNCATING ERRORS AND TAYLOR SERIES Truncating Errors - results from using an approximation in place of an exact mathematical procedure EXAMPLE: Euler’s method used in solving the parachutist problem using approximation Taylor Series - mathematical formulation widely used in numerical methods to express functions in an approximate fashion. - provides a means to predict a function value at one point in terms of the function value and its derivatives at another point - states that any smooth function can be approximated as a polynomial. Zero-order Approximation - indicates that the value of f at the new point is the same as its value at the old point. - very useful if xi and xi+1 are close to each other. ˦{˲
#{

- a value of 1 tells us that the function’s relative error is identical to the relative error in x - a value greater than 1 tells us that the relative error is amplified, whereas a value less than 1 tells us that it is attenuated. - ill-conditioned functions are those functions with very large values. TOTAL NUMERICAL ERROR - Summation of the truncation and round-off error s. - the only way to minimize round-off errors is to increase the number of significant figures - truncation errors can be reduced by decreasing the step size - truncation errors are decreased when there is an increase in the number of computation while round-off errors are increased - DILEMMA: The strategy for decreasing one component of the total error leads to an increase of the other component BLUNDERS - aka gross errors due to an error that contributed to all the other components of error. FORMULATION ERRORS – aka model errors relate to bias that can be ascribed t incomplete mathematical models DATA UNCERTAINTY - associated with inconsistency of nature of data and can exhibit both inaccuracy and imprecision. ROOTS OF EQUATION Bracketing Methods - requires two initial guesses to get the root - should bracket or enclose the root with the guesses - different strategies are used to systematically reduce the bracket and get the correct answer 1. Graphical Methods - simple method for getting an estimate of the root of equation by observing where does a line or curve crosses the x-axis. - limited practical value because they are not precise - used as starting guess for numerical methods Incremental Search Method - locates an interval where the function changes sign and divides the interval into subintervals to again locate where the sign changes and so on. 2. Bisection Method - aka binary chopping, interval halving, or Bolzano’s method - a type of incremental search method in which the interval is always divided in half. - if a function changes sign over an interval, the function value at the midpoint is evaluated and the location of the root is determined as lying at the midpoint of the subinterval within which the sign change occurs and the process is repeated to obtain refined estimates. 3. False Position Method - alternative method based on graphical insight - solves the inefficiency of Bisection Method (no account is taken of the magnitudes of f(xl) and f(xu). - joins f(xl) and f(xu) by a straight line and their intersection with the x- axis will serve as an improved estimate of the root - called false position because replacing a curve with a line will yield a false position (regula falsi in Latin). - aka Linear Interpolation Method. ˦{˲ {{˲ . ˲ { ˲ ˲ . ˦{˲ { . ˦{˲ { NOTE: In bisection method, the interval between xl and xu grows smaller during the course of computation while in false-position method, one of the initial guesses (xl or xu) may stay fixed throughout the computation as the other guess converge on the root. In general, false-position easily converges to the desired root but not all the time, especially for functions with significant curvature, due to its one-sidedness. 4. Modified False-position Method - combination of falseposition and bisection - mitigates the one-sidedness of false position - if one of the bounds is already stuck, the formula of xr for bisection will be used.

˦{˲ {

First-order Approximation - added to the zero-order approximation to provide better estimate - adds a terms consists of a slope f’(xi) multiplied by the distance between the xi and xi+1. - this adds a straight line and is capable of predicting an increase or decrease of the function between xi and xi+1. ˦{˲ # { ˦{˲ { - ˦# {˲ {{˲ # . ˲ { Second-order Approximation - captures some of the curvature that the function might exhibit. ˦ {˲ { {˲ # ˦{˲ # { ˦{˲ { - ˦# {˲ {{˲ # . ˲ { Ŷ . ˲ {\$ The Complete Taylor Series ˦ {˲ { {˲ # ˦{˲ # { ˦{˲ { - ˦# {˲ {{˲ # . ˲ { Ŷ ˦ {˲ { \$ .˲ { {˲ # J . ˲ { - ˞J NOTE: The nth-order Taylor series expansion will be exact for an nth-order polynomial. For other differentiable and continuous functions, such as exponentials and sinusoids, a finite number of terms will not yield an exact estimate. Only if an infinite number of terms are added will the series yield an exact result. If Rn is removed, the right Taylor Series becomes an approximation. That is, the error is proportional to the step size h raised to the (n +1)th power. Rn = O (hn+1) We can usually assume that the truncation error is decreased by the addition of terms to the Taylor series. Derivative Mean-Value Theorem - states that the if a function f(x) and its first derivative are continuous over an interval from xi to xi+1, then there exists at least one point on the function that has a slope f’(ξ) parallel to the line joining f(xi) and f(xi+1) STABILITY AND CONDITION Condition - relates to the sensitivity of the mathematical problem to changes in its input values Numerically Unstable - occurs in those problems if the uncertainty of the input values is grossly magnified by the numerical method. Condition Number - defined as the ratio of these relative errors - provides a measure of the extent to which an uncertainty in x is magnified by f(x)