1/86
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Numerical Methods
computing techniques that help us approximate solutions to mathematical problems
Why do we use numerical methods?
Many engineering problems have no analytical solution, require analytical solutions that are intractable or impractical, and are limited by discrete data
What kinds of engineering problems are we interested in solving via numerical methods?
Engineering Analysis and Engineering design
Engineering Analysis
displacements, stresses in a physical system
Engineerign design
size, shape, and material properties for a given physical system to support its function
A mathematical model expresses
essential features of a physical system or process in mathematical terms
Components of a mathematical model
independent variable, dependent variable, parameters, forcing function
computer program
a finite set of instructions in a programming language for a computer to execute
Algorithim
a finite set of instructions used to solve a specific problem or perform a computation
Modular Programming
dividing a computer program into small sub-programs
Characteristics of module
independent and self-contained, performs a specific will-defined operation, has one entry and exit point
Why modular programming?
writing code for one operation allows reuse, facilitates modification to the operation, makes programming easier, facilitates use of code by others
accuracy
how closely the computed or measured value agrees with the true value
Precision
how closely individual computed or measured values agree with each other
inaccuracy
a systematic deviation from truth(bias)
inprecision
magnitude of scatter(uncertainty)
True error, Et, formula
true value - approximation
True relative error, et, formula
true value - approximation/ true value * 100
True relative error
takes into account order of magnitude
approximate relative error, ea, formula
current approximation - previous approximation/ current approximation * 100
Approximate relative error is based on
iterative numerical approach where approximations get closer to true value
Types of non-numerical error: Blunders
computer or human mistakes(not common today)
Types of non-numerical error: Formulation/Model Errors
due to use of poorly concieved mathematical model(does not accurately represent the physics)
Types of non-numerical error: Data Uncertainty
Due to imprecise or inaccurate measurements
Types of numerical error: Truncation Error
results when approximations are used to represent exact mathematical procedure
Types of numerical error: Roundoff Error
results when numbers having limited significant figures are used to represent exact numbers
Truncation error example
finite divided difference approximation of derivative
Round error example
pi is about 3.14
Why are significant figures omitted in computing techniques
computers can only retain a fixed number of digits and base 2 representation cannot properly represent certain base 10 numbers exactly
floating point representation
enables us to represent large numbers and fractions in the computer
Floating point formula
fl(x) = (-1)^s (1.f) * (2^b-bias)
floating point mantissa
finite set of digits from 0<= di <= beta-1
How many bits in floating point mantissa
t
In base 2 d0=1 so we get
t+1 digits by storing only t
In IEEE754 what is s
1 bit sign
In IEEE754 what is b
k bits exponent
In IEEE754 what is f
t bits for the fraction portion of the mantissa
exponent for IEEE754
b-bias
IEEE754 bias formula
2^(k-1) - 1
denormalized numbers
enables us to represent 0 and enables gradual underflow
underflow
error that occurs when you attempt to access numbers between 0 and the first positive normalized number
overflow
error when you attempt to access numbers larger than the largest normalized number
When the exponent and fraction is all ones f=111….11 we have
NaN
Single precision
s=1, k=8, t=23
Double precision
s=1, k=11, t=52
Lower endpoint formula
bmin+1 - bias
Upper endpoint formula
bmax-1 - bias
machine precision
difference between 1 and the next largest floating point number
machine precision formula
e = beta^-t
An nth-order Taylor polynomial will be exact
for a nth order polynomial
Using Taylor series for functions such as sin,cos,exp
will not be exact
In Taylor series polynomial approxination the remainder term captures
the error
In Taylor series approximation truncations error is proportional to
the order of h^n+1
O(h) when you half stepsize will
half error
O(h²) when you half stepsize will
quater error
If stepsize h is sufficiently small
the first and lower order terms account for most of error
how does rounding error change as step size decreases
increases
how does truncation error change as step size decreases
decreases
How do we know at least one root exists
if f(x) is real and continuous on the interval xl to xu and f(xl) and f(xu) have oppisite signs
Bracketing Methods(Bisection and False Position) are always
convergent
Why might false position be slower than bisection even thought that not usually the case
tends to be one-sided since one of the points remains fixed which can sometimes lead to slow convergence
Why might false position be more efficient the bisection method
it considerers the magnitude of f(xu) and f(xl) in bracketing
When are incremental search methods convergent
monotonic functions with a single root
bracket methods require
2 initial guesses
open methods are root finding methods that
do not require starting values to bracket the root
Open methods may
diverge and typically converge faster than bracketing
Fixed Point Theorem
g(h) is continuous in an interval, [a, b], and a ≤ g(h) ≤ b (existence) and the fixed point is unique if g’ (h) exists and |g′ (ℎ)| ≤ 𝜌 < 1 for all h ∈ [a, b] (uniqueness)
Fixed point error is
linearly convergent
pitfalls of newton-raphson
derivative difficult or expensive to calculate and may diverge, oscillate, or jump roots
Newton-Raphson: oscillations may persist around
local min or max
Newton-Raphson: Initial guess near 1 root can
jump to location several roots away
Newton-Raphson: zero slope leads to
divergence and divide by zero error
When a function does not change sign at a multiple root
bracketing methods fail
when the derivative is 0 at a multiple root
newton-Raphson and secant experience divide by 0 error
Newton-Raphson and secant error for a multiple root function is
linearly convergent
curve fitting
techniques to fit curves to discrete data values to estimate values in between or simplify a complicated function
regression
curve is designed to follow the pattern of the data without attempting to intersect each point
interpolation
curve is designed to pass through each data point
trend analysis
process of using pattern of data to make predictions
hypothesis testing
an existing mathematical model is compared to measured data
residual
discrepancy between the true measured values and the approximate model values predicted by regression
least squares regression
minimize the sum of squares of residuals for all available data
coefficient of determination
quantifies the improvement of error reduction due to describing the data with least squares regression rather than average value
Describe in words what the bias is used for in IEEE standard of floating-point representation
The exponent is stored as an unsigned integer and the bias allows us to achieve positive and negative values of the exponent
In the IEEE754 standard for floating point representation, if the mantissa can store t bits, why do we get t+1?
When we normalize in base-2 the first digit is always 1 so we don’t need to store it
What do the normal equations represent
simultaneous equations that can be solved to find best fit coefficients, necessary conditions to minimize Sr, derivatives of Sr with respect to coefficients set equal to 0
IEEE754 an exponent value of all 1’s (11111) and a mantissa of all zeros represents
Infinity