Module 1 Advance Math
Module 1 Advance Math
MODULE 1:
INTRODUCTION
Many engineering problems are too time consuming to solve or may not be able
to be solved analytically. In these situations, numerical methods are usually
employed. Numerical methods are techniques designed to solve a problem using
numerical approximations. An example of an application of numerical methods is
trying to determine the velocity of a falling object. If you know the exact function
that determines the position of your object, then you could potentially differentiate
the function to obtain an expression for the velocity. More often, you will use a
machine to record readings of times and positions that you can then use to
numerically solve for velocity:
where f is your function, t is the time of the reading, and h is the distance to the next
time step.
Because your answer approximates the analytical solution, there is an inherent error
between the approximated answer and the exact solution.
Numerical Methods and Engineering Practice Since the late 1940s the
widespread availability of digital computers has led to a veritable explosion in the use
and development of numerical methods. At first, this growth was somewhat limited
by the cost of access to large mainframe computers, and, consequently, many
engineers continued to use simple analytical approaches in a significant portion of
their work. The recent evolution of inexpensive personal computers has given us
ready access to powerful computational capabilities. There are several additional
reasons why you should study numerical methods:
2. During your careers, you may often have occasion to use commercially
available prepackaged, or “canned,” computer programs that involve
numerical methods. The intelligent use of these programs is often
predicated on knowledge of the basic theory underlying the methods.
OBJECTIVES
Lesson 1:
Discrete Algebra
● Series: A series is the sum of the terms of a sequence. The result of adding all
the terms together: s1+s2+s3+s4… is the sum of the series.
Today's technology relies on the ability to analyze, manage, and secure massive
volumes of data. Discrete Mathematics offers the theoretical underpinning for these
tasks through its different disciplines, such as combinatorics, graph theory, and
cryptography. For example, graph theory-based algorithms are used by search engines
to efficiently crawl and index the web. Similarly, data encryption and cybersecurity
measures use number theory and complexity theory ideas to prevent unwanted access
to information.
Example 1: Determine that in how many ways can three prizes be shared among 4
boys when
i) No one gets more than one prize.
ii) A boy can get any number of prizes.
Solution:
i) The first prize can be given in 4 ways as one cannot get more than one prize; the
remaining two prizes can be given in 3 and 2 ways respectively.
The total number of ways = 4 x 3 x 2 = 24.
Example 2: Find the sum of all four-digit numbers formed by using 2, 3, 6, 9 in which
no digit is repeated.
Solution:
If 2 occupies unit’s place, the remaining 3 digits can be arranged in 3!= 6 ways.
Similarly, if 2 occupies ten’s place, hundreds place, thousand’s place, in each of
these cases we get 3! numbers. Thus, the positional value contributed by 2 to the sum
when it occupies different values.
Similarly, the values contributed by 3, 6, 9 to the sum are 3! (3)(1111), 3! (6) (1111),
3! (9)(1111) respectively.
Other Examples:
1. If a set B has n elements, then what is the total number of subsets of B. Justify
your answer.
Solution:
If a set B has “n” elements, then the total number of subsets of B is 2n.
For example, if B contains 5 elements, say B = {1, 2, 3, 4, 5}, then the total number
of subsets of B is 25 = 32.
2. If X and y are the two finite sets, such that n(X U Y) = 36, n(X) = 20, n(Y) = 28,
then find n( X ∩ Y).
Solution:
n(X ∩ Y) = 20 + 28 – 36
n(X ∩ Y) = 48 – 36
n(X ∩ Y) = 12.
3. Find the missing number in the sequence: 5, 10, 15, ___, 25, 30.
Solution:
In the given sequence, each preceding term is added with 5 to get the succeeding
term.
I.e., 5 + 5 = 10
10 + 5 = 15
15 + 5 = 20
20 + 5 = 25
25 + 5 = 30.
Hence, the missing term in the given sequence is 20.
Solution:
Given AP: 13, 8, 3, -2…
I.e., d = 8 – 13 = -5
3 – 8 = -5
-2 -3 = -5.
And, n = 10.
The formula to find the nth term of Arithmetic Progression is Tn = a + (n-1)d
Hence, the tenth term of given Arithmetic Progression 13, 8, 3, -2… is -32.
5. In the group of students, there are 6 boys and 4 girls. Out of 10 students, 4
students must be selected. Find out how many ways the students can be selected
such that at least one boy should be selected?
Solution:
Total number of students = 10
Number of boys = 6
Number of girls = 4.
So, here we must select 4 students. In that, at least one boy should be selected.
Therefore, the number of ways to select 4 students such that at least one boy to be
selected = 15 + 80 + 90 + 24 = 209.
agrees with the true value. Sometimes the true value could be the theoretical
value. Accuracy is expressed as % error. It is the % difference between the
measured and the known true value. Accuracy refers to how close your result is
to the true correct value.
Precision refers to how closely individual computed or measured values agree
with each other. Precision is a description of a level of measurement that
yields consistent results when repeated. It is associated with the concept of
“random error”, a form of observational error that leads to measurable values
being inconsistent when repeated.
These concepts can be illustrated graphically using an analogy from target
practice. The bullet holes on each target in Fig. 3.2 can be thought of as the
predictions of a numerical technique, whereas the bull’s-eye represents the truth.
Inaccuracy (also called bias) is defined as systematic deviation from the truth.
Thus, although the shots in Fig. 3.2c are more tightly grouped than those in
Fig. 3.2a, the two cases are equally biased because they are both centered on the
upper left quadrant of the target.
Imprecision (also called uncertainty), on the other hand, refers to the
magnitude of the scatter.
Therefore, although Fig. 3.2b and d are equally accurate (that is, centered on
the bull’s-eye), the latter is more precise because the shots are tightly grouped.
4. To calculate % deviation:
b. If the true value is 15.77 ml, calculate the accuracy of the experiment.
Order of Accuracy
We consider a numerical approximation of an exact value u. The approximation
depends on a small parameter h , which can be for instance the grid size or time step
in a numerical method. We denote the approximation by u ˜ h. The numerical method
has order of accuracy p if there is a number C independent of h such that.
|u ˜ h −u|≤C h p ,
at least for sufficiently small h . Hence, the larger the order of accuracy, the
faster the error is reduced as h decreases. We say that the convergence rate of the
method is h p . The number C typically depends on the exact solution u and possibly on
other parameters in the numerical scheme. What is important is that it does not
depend on h. Often the error u ˜ h−u depends smoothly on h . Then there is an error
coefficient D such that
p p+1
u ˜ h−u=D h +O(h )
Note that this is not equivalent to (1) since the error may be a non-smooth
function of h . We will get back to this issue in Section 4 below. For now, however, we
will assume (2) holds.
Errors
Errors can result prior to computation in the form of measurement errors or
assumptions in modeling. The focus of this blog post will be on understanding two
types of errors that can occur during computation: roundoff errors and truncation
errors.
Roundoff Error
Roundoff errors occur because computers have a limited ability to represent
numbers. For example, π has infinite digits, but due to precision limitations, only 16
digits may be stored in MATLAB. While this roundoff error may seem insignificant, if
your process involves multiple iterations that are dependent on one another, these
small errors may accumulate over time and result in a significant deviation from the
expected value. Furthermore, if a manipulation involves adding a large and small
number, the effect of the smaller number may be lost if rounding is utilized. Thus, it
is advised to sum numbers of similar magnitudes first so that smaller numbers are not
“lost” in the calculation.One interesting example that we covered in my Engineering
Computation class, that can be used to illustrate this point, involves the quadratic
formula. The quadratic formula is represented as follows:
Using a = 0.2, b = – 47.91, c = 6 and if we carry out rounding to two decimal places at
every intermediate step:
The error between our approximations and true values can be found as follows:
As can be seen, the smaller root has a larger error associated with it because
deviations will be more apparent with smaller numbers than larger numbers.
If you have the insight to see that your computation will involve operations with
numbers of differing magnitudes, the equations can sometimes be cleverly
manipulated to reduce roundoff error. In our example, if the quadratic formula
equation is rationalized, the resulting absolute error is much smaller because fewer
operations are required, and numbers of similar magnitudes are being multiplied and
added together:
Truncation Error
Truncation errors are introduced when exact mathematical formulas are represented
by approximations. An effective way to understand truncation error is through a
Taylor Series approximation. Let’s say that we want to approximate some function,
f(x) at the point xi+1, which is some distance, h, away from the basepoint xi, whose
true value is shown in black in Figure 1. The Taylor series approximation starts with a
single zero order term and as additional terms are added to the series, the
approximation begins to approach the true value. However, an infinite number of
terms would be needed to reach this true value.
where Rn is a remainder term used to account for all of the terms that were not
included in the series and is therefore a representation of the truncation error. The
remainder term is generally expressed as Rn=O(hn+1) which shows that truncation error
is proportional to the step size, h, raised to the n+1 where n is the number of terms
included in the expansion. It is clear that as the step size decreases, so does the
truncation error.
The Tradeoff in Errors
The total error of an approximation is the summation of roundoff error and
truncation error. As seen from the previous sections, truncation error decreases as
step size decreases. However, when step size decreases, this usually results in the
necessity for more precise computations which consequently results in an increase in
roundoff error. Therefore, the errors are in direct conflict with one another: as we
decrease one, the other increases.
However, the optimal step size to minimize error can be determined. Using an
iterative method of trying different step sizes and recording the error between the
approximation and the true value, the following graph shown in Figure 2 will result.
The minimum of the curve corresponds to the minimum error achievable and
corresponds to the optimal step size. Any error to the right of this point (larger step
sizes) is primarily due to truncation error and the increase in error to the left of this
point corresponds to where roundoff error begins to dominate. While this graph
is specific to a certain function and type of approximation, the general rule and shape
will still hold for other cases.
questions/
Ahire, A. (2022, January 21). Discrete Mathematics in the Real World. Medium.
https://anushka93719.medium.com/discrete-mathematics-in-the-real-world-
fbfde9d8a4b5
Chapra, Steven C. Applied Numerical Methods with MATLAB for Engineers and
Class Notes from ENGRD 3200: Engineering Computation taught by Professor Peter
Discrete Mathematics in the Real World. (n.d.). Discrete Mathematics in the Real
rw.html#:~:text=Railway%20planning%20uses%20discrete%20math,graph
%20theory%20and%20linear%20algebra.
UK. https://www.studysmarter.co.uk/explanations/math/discrete-
mathematics/
FutureSchool, B. (2023, February 23). What are Discrete Math Purposes in the Real
the-real-world/
https://www.hindawi.com/journals/mpe/si/593474/
Sandefur, J. T., Lockwood, E., Hart, E. W., & Greefrath, G. (2022). Teaching and
https://doi.org/10.1007/s11858-022-01399-7
https://artofproblemsolving.com/blog/articles/discrete-math
https://mathworld.wolfram.com/DiscreteMathematics.html
DON MARIANO MARCOS MEMORIAL STATE UNIVERSITY
Mid - La Union Campus
College of Engineering
Department of Mechanical Engineering
SUBMITTED BY GROUP 1:
SUBMITTED TO:
Instructor\Adviser