SlideShare a Scribd company logo
Numerical Methods for
Engineers
Introduction
Textbook
Textbook
Course Topics:
• 1. Introduction to Numerical Analysis: Area of study in numerical analysis, benefits of studying the
numerical analysis, computer and numerical analysis, mathematical subjects' area, Approximation and
Numerical Error.
• 2. Roots of Equations: Bracketing Methods, Open Methods, System of Nonlinear Equations.
• 3. System of Linear Equations: Gauss Elimination Method, Gauss Jordan Method, Decomposition
Method, Matrix Inverse, Iteration Method.
• 4. Curve Fitting: Introduction, Least Square Regression, Nonlinear Regression Models, Multiple Linear
Regression, Multi-Dimensional Regression, Interpolation, Splines.
• 5. Numerical Differential and Integration: Numerical Differentiation, Numerical Integration, The
Trapezoidal Rule, the Simpson’s rule, Integration with unequal segments, Integration of function.
• 6. Ordinary Differential Equations (ODE): Introduction, Euler’s Method, Runge-Kutta Method, Adams
Multi-step Methods, Boundary Value Problem, Eigenvalues Problem.
• 7. MATLAB Programming
Why you should study numerical methods:
1. Numerical methods greatly expand the types of problems you can address. They are capable of handling
large systems of equations, nonlinearities, and complicated geometries that are not uncommon in engineering
and science and that are often impossible to solve analytically with standard calculus.
2. Numerical methods allow you to use software with insight. During your career, you will invariably have
occasion to use commercially available prepackaged computer programs that involve numerical methods. The
intelligent use of these programs is greatly enhanced by an understanding of the basic theory underlying the
methods. In the absence of such understanding, you will be left to treat such packages as “black boxes” with
little critical insight into their inner workings or the validity of the results they produce.
3. Many problems cannot be approached using canned programs. If you are conversant with numerical
methods, and are adept at computer programming, you can design your own programs to solve problems
without having to buy or commission expensive software.
4. Numerical methods are an efficient vehicle for learning to use computers.
5. Numerical methods provide a vehicle for you to reinforce your understanding of mathematics.
Numerical Methods Covered in this Course (1)
• Part Two deals with two related topics: root finding and optimization. As depicted in
(Fig. a) below, root location involves searching for the zeros of a function. In
contrast, optimization involves determining a value or values of an independent
variable that correspond to a “best” or optimal value of a function. Thus,
optimization involves identifying maxima and minima. Although somewhat different
approaches are used, root location and optimization both typically arise in design
contexts.
Numerical Methods Covered in this Course (2)
• Part Three is devoted to solving systems of simultaneous linear algebraic equations (Fig. b).
Such systems are similar in spirit to roots of equations in the sense that they are concerned
with values that satisfy equations. However, in contrast to satisfying a single equation, a set
of values is sought that simultaneously satisfies a set of linear algebraic equations. Such
equations arise in a variety of problem contexts and in all disciplines of engineering and
science. They originate in the mathematical modeling of large systems of interconnected
elements such as structures, electric circuits, and fluid networks. However, they are also
encountered in other areas of numerical methods such as curve fitting and differential
equations.
Numerical Methods Covered in this Course (3)
• As an engineer or scientist, you will often have occasion to fit curves to data points. The techniques
developed for this purpose can be divided into two general categories: regression and interpolation.
As described in Part Four (Fig. c), regression is employed where there is a significant degree of error
associated with the data. Experimental results are often of this kind. For these situations, the strategy
is to derive a single curve that represents the general trend of the data without necessarily matching
any individual points.
• In contrast, interpolation is used where the objective is to determine intermediate values between
relatively error-free data points. Such is usually the case for tabulated information. The strategy in
such cases is to fit a curve directly through the data points and use the curve to predict the
intermediate values.
Numerical Methods Covered in this Course (4)
• As depicted in Fig. d, Part Five is devoted to integration and differentiation. A physical interpretation of
numerical integration is the determination of the area under a curve. Integration has many applications in
engineering and science, ranging from the determination of the centroids of oddly shaped objects to the
calculation of total quantities based on sets of discrete measurements. In addition, numerical integration
formulas play an important role in the solution of differential equations.
• Part Five also covers methods for numerical differentiation. As you know from your study of calculus, this
involves the determination of a function’s slope or its rate of change.
Numerical Methods Covered in this Course (5)
• Finally, Part Six focuses on the solution of ordinary differential equations (Fig. e).
Such equations are of great significance in all areas of engineering and science. This
is because many physical laws are understood in terms of the rate of change of a
quantity rather than the magnitude of the quantity itself. Examples range from
population-forecasting models (rate of change of population) to the acceleration of a
falling body (rate of change of velocity).
• Two types of problems are addressed: initial-value and boundary-value problems.
Introduction to MATLAB: Entering Vectors
• In MATLAB, the basic objects are matrices, i.e., arrays of numbers. Vectors can be thought of as special matrices.
A row vector is recorded as a 1 × 𝑛 matrix and a column vector is recorded as a 𝑚 × 1 matrix.
• To enter a row vector in MATLAB, type the following in the command window:
>> v = [0 1 2 3], and press enter. MATLAB will print out the row vector.
• To enter a column vector type
>> u = [9; 10; 11; 12; 13]. You can access an entry in a vector with u(2) and change the value of that entry with
>> u(2) = 47
• You can extract a slice out of a vector with
>> u (2:4)
• You can change a row vector into a column vector, and vice versa, easily in MATLAB using
>> w = v’, This is called transposing the vector and we call ' the transpose operator.
• There are also useful shortcuts to make vectors such as
>> x = -1:.1:1
>> y = linspace (0 ,1 ,11), it will give 11 numbers between 0 and 1
Introduction to MATLAB: Basic Formatting
• To make MATLAB put fewer blank lines in its output, enter
>> format compact
>> pi
➔ 3.1416
• To make MATLAB display more digits, enter
>> format long
>> pi
➔ 3.141592653589793
• Note that this does not change the number of digits MATLAB is using in its calculations; it only
changes what is displayed.
Introduction to MATLAB: Plotting Data
• Enter the data into MATLAB with the following commands in the command window:
>> x = [ 5 20 30 50 55 ]
>> y = [ 0.08 0.015 0.009 0.006 0.0055]
• Entering the name of the variable retrieves its current values. For instance
>> x
• We can plot data in the form of vectors using the plot command:
>> plot (x,y), this will produce a graph with the data points connected by lines.
• If you would prefer that the data points be represented by symbols you can do so. For instance;
>> plot (x,y,'*’)
>> plot (x,y,'o’)
>> plot (x,y,'.')
Data as a Representation of a Function
• A major theme in this course is that often we are interested in a certain function y =
f(x), but the only information we have about this function is a discrete set of data
{(xi; yi)}. Plotting the data can be thought of envisioning the function using just the
data.
• We will find later that we can also do other things with the function, like
differentiating and integrating, just using the available data.
• Numerical methods, the topic of this course, means doing mathematics by computer.
Since a computer can only store a finite amount of information, we will almost
always be working with a finite, discrete set of values of the function (data), rather
than a formula for the function.
Introduction to MATLAB: Built-in Functions
• If we wish to deal with formulas for functions, MATLAB contains several built-in functions, including all the usual
functions, such as sin( ), exp( ), etc.. The meaning of most of these is clear. The dependent variable (input) always goes
in parentheses in MATLAB. For instance
>> sin (pi), should return the value of sin π, which is of course 0 and
>> exp (0), will return e0 which is 1.
• More importantly, the built-in functions can operate not only on single numbers but on vectors. For example
>> x = linspace (0 ,2*pi, 41)
>> y = sin(x)
>> plot (x,y), will return a plot of sin x on the interval [0, 2π]
• Some of the built-in functions in MATLAB include cos( ), tan( ), sinh( ), cosh( ), log( ) (natural logarithm), log10( ) (log
base 10), asin( ) (inverse sine), acos( ), atan( ).
• To find out more about a function, use the help command; try
>> help plot
Introduction to MATLAB: User-Defined
Anonymous Functions
• If we wish to deal with a function that is a combination of the built-in functions, MATLAB has a couple of ways for the user to dene
functions. One that we will use a lot is the anonymous function, which is a way to define a function in the command window. The
following is a typical anonymous function:
>> f = @(x) 2*x.^2 - 3*x + 1. This produces the function f(x) = 2x2 - 3x + 1. To obtain a single value of this function enter
>> y = f (2.23572)
➔ 4.2897
• Just as for built-in functions, the function f as we defined it can operate not only on single numbers but on vectors. Try the following:
>> x = -2:0.2:2
>> y = f(x)
• This is an example of vectorization, i.e., putting several numbers into a vector and treating the vector all at once, rather than one
component at a time, and is one of the strengths of MATLAB. The reason f(x) works when x is a vector is because we represented x2 by
x.^2. The . turns the exponent operator ^ into entry-wise exponentiation, so that [-2 -1.8 -1.6].^2 means [(-2)2; (-1.8)2; (-1.6)2] and
yields [4 3.24 2.56]. In contrast, [-2 -1.8 -1.6]^2 means the matrix product [-2;-1.8;-1.6][-2;-1.8;-1.6] and yields only an error.
• The . is needed in .^, .*, and ./. It is not needed when you * or / by a scalar or for + and -.
• The results can be plotted using the plot command, just as for data:
• plot (x,y)
• Notice that before plotting the function, we in effect converted it into data. Plotting on any machine always requires this step.
Exercises
• 1.1) Recall that .*, ./, .^ are component-wise operations. Make row vectors a = 0 : 1 : 3 and b =[-1 0 1 2]. Try the
following commands and report the answer (or error) they produce. Are any of the results surprising?
(a) a.*b, (b) a*b, (c) a*b', (d) a+3*b, (e) a./b, (f) 2*b./a, (g) a.^3, (h) a.^b
• 1.2) Input the data of the below table as vectors and plot it, using symbols at the data points. Use the insert icon to label
the axes and add a title to your graph. Turn in the graph. Indicate what the data is and properly reference where it came
from.
• 1.3) Find a non-linear function formula in an engineering or science textbook or website. Make an anonymous function
that produces that function. Plot it with a smooth curve on a physically relevant domain.
Label the axes and add a title to your graph. Turn in the graph and include the MATLAB command for the anonymous
function.
Ad

More Related Content

Similar to Engineering Numerical Analysis-Introduction.pdf (20)

Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
joellivz
 
Matlab for marketing people
Matlab for marketing peopleMatlab for marketing people
Matlab for marketing people
Toshiaki Takeuchi
 
Visual Techniques
Visual TechniquesVisual Techniques
Visual Techniques
Md. Shohel Rana
 
Lesson 7-computer programming case study-FINAL.pptx
Lesson 7-computer programming case study-FINAL.pptxLesson 7-computer programming case study-FINAL.pptx
Lesson 7-computer programming case study-FINAL.pptx
claritoBaluyot2
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & ScientistsAdvanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & Scientists
Ray Phan
 
BEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptx
BEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptxBEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptx
BEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptx
chemeng87
 
Mbd dd
Mbd ddMbd dd
Mbd dd
Aditya Choudhury
 
Application's of Numerical Math in CSE
Application's of Numerical Math in CSEApplication's of Numerical Math in CSE
Application's of Numerical Math in CSE
sanjana mun
 
Module-2_ML.pdf
Module-2_ML.pdfModule-2_ML.pdf
Module-2_ML.pdf
ArpanSoni16
 
Matlab pt1
Matlab pt1Matlab pt1
Matlab pt1
Austin Baird
 
Importance of matlab
Importance of matlabImportance of matlab
Importance of matlab
krajeshk1980
 
Lecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdfLecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdf
ssuserff72e4
 
ADA_Module 1_MN.pptx- Analysis and design of Algorithms
ADA_Module 1_MN.pptx- Analysis and design of AlgorithmsADA_Module 1_MN.pptx- Analysis and design of Algorithms
ADA_Module 1_MN.pptx- Analysis and design of Algorithms
madhu614742
 
A Comparative Analysis Of Assignment Problem
A Comparative Analysis Of Assignment ProblemA Comparative Analysis Of Assignment Problem
A Comparative Analysis Of Assignment Problem
Jim Webb
 
A0280115(1)
A0280115(1)A0280115(1)
A0280115(1)
prabhat k prasad
 
MATLAB for Engineers ME1006 (1 for beginer).pptx
MATLAB for Engineers ME1006 (1 for beginer).pptxMATLAB for Engineers ME1006 (1 for beginer).pptx
MATLAB for Engineers ME1006 (1 for beginer).pptx
lav8bell
 
cs 601 - lecture 1.pptx
cs 601 - lecture 1.pptxcs 601 - lecture 1.pptx
cs 601 - lecture 1.pptx
GopalPatidar13
 
Unit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptxUnit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptx
smithashetty24
 
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
SSA KPI
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
Abdullah Al-hazmy
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
joellivz
 
Lesson 7-computer programming case study-FINAL.pptx
Lesson 7-computer programming case study-FINAL.pptxLesson 7-computer programming case study-FINAL.pptx
Lesson 7-computer programming case study-FINAL.pptx
claritoBaluyot2
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & ScientistsAdvanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & Scientists
Ray Phan
 
BEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptx
BEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptxBEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptx
BEN520 FUNDAMENTALS OF BOENGINEERING II-4 week-lecture 4.pptx
chemeng87
 
Application's of Numerical Math in CSE
Application's of Numerical Math in CSEApplication's of Numerical Math in CSE
Application's of Numerical Math in CSE
sanjana mun
 
Importance of matlab
Importance of matlabImportance of matlab
Importance of matlab
krajeshk1980
 
Lecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdfLecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdf
ssuserff72e4
 
ADA_Module 1_MN.pptx- Analysis and design of Algorithms
ADA_Module 1_MN.pptx- Analysis and design of AlgorithmsADA_Module 1_MN.pptx- Analysis and design of Algorithms
ADA_Module 1_MN.pptx- Analysis and design of Algorithms
madhu614742
 
A Comparative Analysis Of Assignment Problem
A Comparative Analysis Of Assignment ProblemA Comparative Analysis Of Assignment Problem
A Comparative Analysis Of Assignment Problem
Jim Webb
 
MATLAB for Engineers ME1006 (1 for beginer).pptx
MATLAB for Engineers ME1006 (1 for beginer).pptxMATLAB for Engineers ME1006 (1 for beginer).pptx
MATLAB for Engineers ME1006 (1 for beginer).pptx
lav8bell
 
cs 601 - lecture 1.pptx
cs 601 - lecture 1.pptxcs 601 - lecture 1.pptx
cs 601 - lecture 1.pptx
GopalPatidar13
 
Unit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptxUnit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptx
smithashetty24
 
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
SSA KPI
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
Abdullah Al-hazmy
 

Recently uploaded (20)

Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
Avnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights FlyerAvnet Silica's PCIM 2025 Highlights Flyer
Avnet Silica's PCIM 2025 Highlights Flyer
WillDavies22
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Ad

Engineering Numerical Analysis-Introduction.pdf

  • 4. Course Topics: • 1. Introduction to Numerical Analysis: Area of study in numerical analysis, benefits of studying the numerical analysis, computer and numerical analysis, mathematical subjects' area, Approximation and Numerical Error. • 2. Roots of Equations: Bracketing Methods, Open Methods, System of Nonlinear Equations. • 3. System of Linear Equations: Gauss Elimination Method, Gauss Jordan Method, Decomposition Method, Matrix Inverse, Iteration Method. • 4. Curve Fitting: Introduction, Least Square Regression, Nonlinear Regression Models, Multiple Linear Regression, Multi-Dimensional Regression, Interpolation, Splines. • 5. Numerical Differential and Integration: Numerical Differentiation, Numerical Integration, The Trapezoidal Rule, the Simpson’s rule, Integration with unequal segments, Integration of function. • 6. Ordinary Differential Equations (ODE): Introduction, Euler’s Method, Runge-Kutta Method, Adams Multi-step Methods, Boundary Value Problem, Eigenvalues Problem. • 7. MATLAB Programming
  • 5. Why you should study numerical methods: 1. Numerical methods greatly expand the types of problems you can address. They are capable of handling large systems of equations, nonlinearities, and complicated geometries that are not uncommon in engineering and science and that are often impossible to solve analytically with standard calculus. 2. Numerical methods allow you to use software with insight. During your career, you will invariably have occasion to use commercially available prepackaged computer programs that involve numerical methods. The intelligent use of these programs is greatly enhanced by an understanding of the basic theory underlying the methods. In the absence of such understanding, you will be left to treat such packages as “black boxes” with little critical insight into their inner workings or the validity of the results they produce. 3. Many problems cannot be approached using canned programs. If you are conversant with numerical methods, and are adept at computer programming, you can design your own programs to solve problems without having to buy or commission expensive software. 4. Numerical methods are an efficient vehicle for learning to use computers. 5. Numerical methods provide a vehicle for you to reinforce your understanding of mathematics.
  • 6. Numerical Methods Covered in this Course (1) • Part Two deals with two related topics: root finding and optimization. As depicted in (Fig. a) below, root location involves searching for the zeros of a function. In contrast, optimization involves determining a value or values of an independent variable that correspond to a “best” or optimal value of a function. Thus, optimization involves identifying maxima and minima. Although somewhat different approaches are used, root location and optimization both typically arise in design contexts.
  • 7. Numerical Methods Covered in this Course (2) • Part Three is devoted to solving systems of simultaneous linear algebraic equations (Fig. b). Such systems are similar in spirit to roots of equations in the sense that they are concerned with values that satisfy equations. However, in contrast to satisfying a single equation, a set of values is sought that simultaneously satisfies a set of linear algebraic equations. Such equations arise in a variety of problem contexts and in all disciplines of engineering and science. They originate in the mathematical modeling of large systems of interconnected elements such as structures, electric circuits, and fluid networks. However, they are also encountered in other areas of numerical methods such as curve fitting and differential equations.
  • 8. Numerical Methods Covered in this Course (3) • As an engineer or scientist, you will often have occasion to fit curves to data points. The techniques developed for this purpose can be divided into two general categories: regression and interpolation. As described in Part Four (Fig. c), regression is employed where there is a significant degree of error associated with the data. Experimental results are often of this kind. For these situations, the strategy is to derive a single curve that represents the general trend of the data without necessarily matching any individual points. • In contrast, interpolation is used where the objective is to determine intermediate values between relatively error-free data points. Such is usually the case for tabulated information. The strategy in such cases is to fit a curve directly through the data points and use the curve to predict the intermediate values.
  • 9. Numerical Methods Covered in this Course (4) • As depicted in Fig. d, Part Five is devoted to integration and differentiation. A physical interpretation of numerical integration is the determination of the area under a curve. Integration has many applications in engineering and science, ranging from the determination of the centroids of oddly shaped objects to the calculation of total quantities based on sets of discrete measurements. In addition, numerical integration formulas play an important role in the solution of differential equations. • Part Five also covers methods for numerical differentiation. As you know from your study of calculus, this involves the determination of a function’s slope or its rate of change.
  • 10. Numerical Methods Covered in this Course (5) • Finally, Part Six focuses on the solution of ordinary differential equations (Fig. e). Such equations are of great significance in all areas of engineering and science. This is because many physical laws are understood in terms of the rate of change of a quantity rather than the magnitude of the quantity itself. Examples range from population-forecasting models (rate of change of population) to the acceleration of a falling body (rate of change of velocity). • Two types of problems are addressed: initial-value and boundary-value problems.
  • 11. Introduction to MATLAB: Entering Vectors • In MATLAB, the basic objects are matrices, i.e., arrays of numbers. Vectors can be thought of as special matrices. A row vector is recorded as a 1 × 𝑛 matrix and a column vector is recorded as a 𝑚 × 1 matrix. • To enter a row vector in MATLAB, type the following in the command window: >> v = [0 1 2 3], and press enter. MATLAB will print out the row vector. • To enter a column vector type >> u = [9; 10; 11; 12; 13]. You can access an entry in a vector with u(2) and change the value of that entry with >> u(2) = 47 • You can extract a slice out of a vector with >> u (2:4) • You can change a row vector into a column vector, and vice versa, easily in MATLAB using >> w = v’, This is called transposing the vector and we call ' the transpose operator. • There are also useful shortcuts to make vectors such as >> x = -1:.1:1 >> y = linspace (0 ,1 ,11), it will give 11 numbers between 0 and 1
  • 12. Introduction to MATLAB: Basic Formatting • To make MATLAB put fewer blank lines in its output, enter >> format compact >> pi ➔ 3.1416 • To make MATLAB display more digits, enter >> format long >> pi ➔ 3.141592653589793 • Note that this does not change the number of digits MATLAB is using in its calculations; it only changes what is displayed.
  • 13. Introduction to MATLAB: Plotting Data • Enter the data into MATLAB with the following commands in the command window: >> x = [ 5 20 30 50 55 ] >> y = [ 0.08 0.015 0.009 0.006 0.0055] • Entering the name of the variable retrieves its current values. For instance >> x • We can plot data in the form of vectors using the plot command: >> plot (x,y), this will produce a graph with the data points connected by lines. • If you would prefer that the data points be represented by symbols you can do so. For instance; >> plot (x,y,'*’) >> plot (x,y,'o’) >> plot (x,y,'.')
  • 14. Data as a Representation of a Function • A major theme in this course is that often we are interested in a certain function y = f(x), but the only information we have about this function is a discrete set of data {(xi; yi)}. Plotting the data can be thought of envisioning the function using just the data. • We will find later that we can also do other things with the function, like differentiating and integrating, just using the available data. • Numerical methods, the topic of this course, means doing mathematics by computer. Since a computer can only store a finite amount of information, we will almost always be working with a finite, discrete set of values of the function (data), rather than a formula for the function.
  • 15. Introduction to MATLAB: Built-in Functions • If we wish to deal with formulas for functions, MATLAB contains several built-in functions, including all the usual functions, such as sin( ), exp( ), etc.. The meaning of most of these is clear. The dependent variable (input) always goes in parentheses in MATLAB. For instance >> sin (pi), should return the value of sin π, which is of course 0 and >> exp (0), will return e0 which is 1. • More importantly, the built-in functions can operate not only on single numbers but on vectors. For example >> x = linspace (0 ,2*pi, 41) >> y = sin(x) >> plot (x,y), will return a plot of sin x on the interval [0, 2π] • Some of the built-in functions in MATLAB include cos( ), tan( ), sinh( ), cosh( ), log( ) (natural logarithm), log10( ) (log base 10), asin( ) (inverse sine), acos( ), atan( ). • To find out more about a function, use the help command; try >> help plot
  • 16. Introduction to MATLAB: User-Defined Anonymous Functions • If we wish to deal with a function that is a combination of the built-in functions, MATLAB has a couple of ways for the user to dene functions. One that we will use a lot is the anonymous function, which is a way to define a function in the command window. The following is a typical anonymous function: >> f = @(x) 2*x.^2 - 3*x + 1. This produces the function f(x) = 2x2 - 3x + 1. To obtain a single value of this function enter >> y = f (2.23572) ➔ 4.2897 • Just as for built-in functions, the function f as we defined it can operate not only on single numbers but on vectors. Try the following: >> x = -2:0.2:2 >> y = f(x) • This is an example of vectorization, i.e., putting several numbers into a vector and treating the vector all at once, rather than one component at a time, and is one of the strengths of MATLAB. The reason f(x) works when x is a vector is because we represented x2 by x.^2. The . turns the exponent operator ^ into entry-wise exponentiation, so that [-2 -1.8 -1.6].^2 means [(-2)2; (-1.8)2; (-1.6)2] and yields [4 3.24 2.56]. In contrast, [-2 -1.8 -1.6]^2 means the matrix product [-2;-1.8;-1.6][-2;-1.8;-1.6] and yields only an error. • The . is needed in .^, .*, and ./. It is not needed when you * or / by a scalar or for + and -. • The results can be plotted using the plot command, just as for data: • plot (x,y) • Notice that before plotting the function, we in effect converted it into data. Plotting on any machine always requires this step.
  • 17. Exercises • 1.1) Recall that .*, ./, .^ are component-wise operations. Make row vectors a = 0 : 1 : 3 and b =[-1 0 1 2]. Try the following commands and report the answer (or error) they produce. Are any of the results surprising? (a) a.*b, (b) a*b, (c) a*b', (d) a+3*b, (e) a./b, (f) 2*b./a, (g) a.^3, (h) a.^b • 1.2) Input the data of the below table as vectors and plot it, using symbols at the data points. Use the insert icon to label the axes and add a title to your graph. Turn in the graph. Indicate what the data is and properly reference where it came from. • 1.3) Find a non-linear function formula in an engineering or science textbook or website. Make an anonymous function that produces that function. Plot it with a smooth curve on a physically relevant domain. Label the axes and add a title to your graph. Turn in the graph and include the MATLAB command for the anonymous function.