Introduction To Numerical Methods Prof
Introduction To Numerical Methods Prof
NUMERICAL METHODS:
Numerical methods are techniques by which
mathematical problems are formulated so that they can • Numerical methods are extremely powerful problem-
be solved with arithmetic operations, however, they solving tools.
involve large numbers of tedious arithmetic
• In the field, there are occasions which an engineer will
calculations.
use an available prepackaged or “canned” computer
With the availability of fast, digital computers, programs that involve numerical methods. However,
numerical methods of solving engineering problems not all problems can be solved by these “canned”
became more popular. programs. Studying numerical methods can increase the
capabilities of these “canned” programs by customizing
In pre-computer era, engineers solved it according to the specifications of the problem.
problems in the following manner:
• Numerical methods are an efficient vehicle for
• Solutions were derived for some problems using learning to use computers.
analytical, or exact methods.
• Numerical methods provide a vehicle for you to
• Graphical solutions were used to characterize the reinforce your understanding of mathematics.
behavior of systems.
SUBJECT AREAS ARE COVERED IN THE STUDY OF
• Calculators and slide rules were used to implement
NUMERICAL METHOD
numerical methods manually.
1. Roots of equations – these problems are concerned
With this, significant amount of energy were with the value of a variable or a parameter that satisfies
expended on the solution technique itself, rather than a single nonlinear equation. These problems are
on the problem definition and interpretation. especially valuable in engineering design contexts
With fast and efficient computers, numerical where it is often impossible to explicitly solve design
methods can be implemented and solutions obtained equations for parameters.
within a short span of time.
4. Curve fitting – the techniques developed for this A mathematical model can be broadly defined
purpose can be divided into two general categories: as the formulation or equation that expresses the
regression and interpolation. Regression is employed essential features of a physical system or process in
where there is a significant degree of error associated mathematical terms. In a very general sense, it can be
with the data, and the strategy is to derive a single represented as a functional relationship of the form:
curve that represents the general trend. Interpolation is
used when the objective is to determine intermediate
values between relatively error-free data, and the
strategy is to fit a curve directly through the data points
and use the curve to predict the intermediate values.
Where:
6. Ordinary and partial differential equations – many Mathematical models of the physical world are
physical laws are couched in terms of the rate of change characterized by the following:
of the quantity rather than the quantity itself. If the
quantity is one-dimensional, an ordinary differential • It describes a natural process or system in
equation arises; a partial differential equation is mathematical terms.
obtained when the quantity is multidimensional.
𝒙 + (𝟏𝟎%)𝒙 = 𝒙 + 𝟎. 𝟏𝒙 = 𝟏. 𝟏𝒙 Solution
A carpenter produces and sells his own furniture. Pine 𝒚: 𝒕𝒉𝒆 𝒔𝒖𝒓𝒇𝒂𝒄𝒆 𝒂𝒍𝒍𝒐𝒕𝒆𝒅 𝒕𝒐 𝒐𝒂𝒕𝒔 (𝒎𝟐 )
tables are sold for 650 $, cherry tables for 750 $ and
maple tables for 850 $. What is the carpenter’s annual 𝒛: 𝒕𝒉𝒆 𝒔𝒖𝒓𝒇𝒂𝒄𝒆 𝒂𝒍𝒍𝒐𝒕𝒆𝒅 𝒕𝒐 𝒂𝒑𝒑𝒍𝒆 (𝒎𝟐 )
revenue?
𝑹𝒆𝒗𝒆𝒏𝒖𝒆𝒔 = 𝟑. 𝟓𝟎𝒙 + 𝟐. 𝟕𝟓𝒚 + 𝟒. 𝟓𝟎𝒛
Solution:
Four constraints are forced on the farmer:
The annual revenue of the carpenter can only be
1. "The farmer has a land of 1 million square metres"
obtained if the amount of tables sold of each type is
known. Variables must therefore replace these 𝒙 + 𝒚 + 𝒛 ≤ 𝟏, 𝟎𝟎𝟎, 𝟎𝟎𝟎
quantities, all unknownfor the moment. Let us define:
2. "The farmer must dedicate a minimum of 300 000
x :the number of pine tables sold during the year square metres to corn and oats"
y :the number of cherry tables sold during the year 𝒙 + 𝒚 ≥ 𝟑𝟎𝟎, 𝟎𝟎𝟎
z :the number of maple tables sold during the year 3. "Since corn is more susceptible to long periods of
drought, he does not want this culture to occupy more
Each pine table produces a revenue of 650 $. If x pine than 200 000 square metres"
tables are sold, a revenue of 650 times x will be
obtained. The same argument applies to the other 𝒙 ≤ 𝟐𝟎𝟎, 𝟎𝟎𝟎
types of tables. Consequently,
4. "He would like to allot the same space to oats and
𝑻𝒐𝒕𝒂𝒍 𝑹𝒆𝒗𝒆𝒏𝒖𝒆 = 𝟔𝟓𝟎𝒙 + 𝟕𝟓𝟎𝒚 + 𝟖𝟓𝟎𝒛 orchards "
𝒚=𝒛
Repetition.
FLOWCHART
• SEQUENCE - The sequence structure expresses the If there are multiple alternatives, the following selection
trivial idea that unless you direct it otherwise, the structures can be used.
computer code is to be implemented one instruction at
a time.
SAMPLE PROBLEM
The measured values of a bridge and a river where n is the number of significant figures (at
are 9999 cm and 9 cm, respectively. If the true values least).
are 10000 cm and 10 cm respectively, compute the true
error and the true percent relative error for each case. SAMPLE PROBLEM NO. 1:
𝒙
𝒙𝟐 𝒙𝟑 𝒙𝒏
𝒆 = 𝟏 + 𝒙 + + + ⋯.+
𝟐! 𝟑! 𝒏!
Using this expansion, determine the value of e0.5
correct to three significant figures.
True Value
𝒆𝟎.𝟓 = 𝟏. 𝟔𝟒𝟖𝟕𝟐𝟏𝟐𝟕𝟏
𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒆 𝑬𝒓𝒓𝒐𝒓 4
𝒆𝒂 = 𝒙𝟏𝟎𝟎%
𝑨𝒑𝒑𝒓𝒐𝒙𝒊𝒎𝒂𝒕𝒆 𝑽𝒂𝒍𝒖𝒆 5
One of the challenges of numerical methods is 6
to determine error estimates in the absence of
knowledge regarding the true value. That is why SAMPLE PROBLEM NO. 2
numerical methods employ different ways of
The derivative of a function f(x) at a value of x can be
determining the approximate error depending on the
approximately calculated by:
algorithms used.
𝒇(𝒙 + 𝒉) − 𝒇(𝒙)
Errors can be positive or negative, however, 𝒇(𝒙) =
𝒉
signs of the error may not play a role in the
computation. Therefore it is often useful to employ the 𝑰𝒇 𝒇’(𝟐)𝒇𝒐𝒓𝒇(𝒙) = 𝟕𝒆𝟎.𝟓𝒙 𝒂𝒏𝒅 𝒉 = 𝟎. 𝟑, 𝒇𝒊𝒏𝒅
absolute values of the errors and compare it with a
a.) Approximate Value of f’(2)
certain tolerance, or
b.) True Value of f’(2)
|𝒆𝒂 | < 𝒆𝒔 c.) True Error