Sunteți pe pagina 1din 22

Numerical Methods

BE 2550
Abhilash Pandya, Ph.D.

So, what did we learn in this


class?
Different types of numerical methods that
will make our observation of Nature easier
and more efficient.
Methods that will allow us to build
abstractions and systems.
PROGRAMMING.I want to give you a
skill that is of utmost importance in
Engineering.
Data collection (Arduino)
GUI programming Image processing

Laws
Physical laws or abstractions.
Nature is observed in experiments
V: 3 6
I : 0.1 0.2

9
0.3

12
0.4

Come up with laws:


V = RIwhere R is the slope
Lump the abstraction
Resistors, Voltage Sources, Capacitors
Inductors

Models
Learning how mathematical models
can be formulated on the basis of
scientific principles to simulate the
behavior of a simple physical system.
Understanding how numerical
methods afford a means to generalize
solutions in a manner that can be
implemented on a digital computer.

Overview
Root finding

Dynamic
differential
system

Systems of
Equations

Tools:
Matlab,
Arduino,
GUI

Find Job
Regression,
Interpolation,
Splines

Differentiation

Integration

Build
Models

Build
Systems

Help
Society

Make
Money

Find job-> Make a difference


Engineering

Refine
Model

Test Model

Collect Data

Make Model

A Simple Mathematical Model


A mathematical model can be broadly
defined as a formulation or equation that
expresses the essential features of a
physical system or process in
mathematical terms.
Models can be represented by a functional
relationship between dependent variables,
independent variables, parameters, and
forcing functions.

Model Function
independent
Dependent
forcing
f
, parameters,

variable
variables
functions

Dependent variable - a characteristic that usually


reflects the behavior or state of the system
Independent variables - dimensions, such as time and
space, along which the systems behavior is being
determined
Parameters - constants reflective of the systems
properties or composition
Forcing functions - external influences acting upon the
system

Model Results
Using a computer, the
model can be used to
generate a graphical
representation of the
system
Measured fall time of a
small steel sphere falling
from various heights.
The data is in good
agreement with the
predicted fall time of ,
where h is the height and
g is the acceleration of
gravity.

Numerical Modeling
Babylonian clay tablet YBC
7289
The approximation of the
square root of 2 is
four sexagesimal figures,
which is about
six decimal figures. 1 + 24/60 +
51/602 + 10/603 = 1.41421296
Note, that there is no exact
answer.

http://www.math.ubc.ca/~cass/Euclid/ybc/ybc.html

Bases for Numerical Models


Conservation laws provide the foundation for many model functions.
All fields of engineering and science apply these laws to different
paradigms within the field.
Physics, chemistry, mechanical , electrical, industrial
Optimization occurs in portfolio management
Differential equations and Markov chains are essenetial in
simulation living cells.
Among these laws are:
Conservation of mass
Conservation of momentum
Conservation of charge
Conservation of energy

Square root 6?
2.4494897427831780
98197284074705891
39196594748065667
01284326925672509
6037745

What if NASA asked


you to make an exact
square mirror to fix
the hubble that was 6
meters^2 in area.
Could you do it?

Error!
Measuring errors
True error
Relative true error
Approximate error
Relative approximate error
Significant digits

Root Finding
Bisection Method
Newton-Raphson
Secant

Algebraic Equations
Makes all
three
equations
valid!
MATLAB:
m=
3.0000 2.0000 -1.0000
2.0000 -2.0000 4.0000
-1.0000 0.5000 -1.0000
>> v = [1 -2 0];
>> inv (m) *v'
ans =
1.0000
-2.0000
-2.0000

Gaussian Elimination
LU Decomposition
Gauss-Seidal

Direct vs. iterative


Closed form vs. Open form
* Consider the problem of solving
3x3+4=28

Iterative method initial guess a=0, b=3.


F(a) = -24 F(b) = 57
a

mid

f(mid)

Direct method
3x3 + 4 = 28.
Subtract 4

3x3 = 24.

Divide by 3

x3 = 8.

Take cube roots

x = 2.

1.5

-13.875

1.5

2.25

10.17...

1.5

2.25

1.875

-4.22...

1.875

2.25

2.0625

2.32...

We conclude from this table that the solution is between 1.875 and 2.0625.
The algorithm might return any number in that range with an error less than
0.2.

Regression/Interpolation
Creating modelsV= IR; F = MA

Direct Method
Newtons Divide Difference
Lagrange Method
Spline
Linear Regression
Non-linear Regression

Integration Differentiation

Integration
Trapezoidal Rule
Simpsons Rule
Romberg Rule
Gauss Quadrature

Differentiation:
Continuous Functions
Discrete functions
Forward Difference
Backward Difference
Central Difference

Differential Equations

If you set up 100 fans to blow air from one


end of the room to the other and then you
drop a feather into the wind, what
happens?
Eulers Method
Runge-Kutta Methods

MATLAB

The default MATLAB Desktop GUI Development (ug!)

1-1

Real World Data:


Matlab-> Arduino (double ug!)

The ly Philosophy
Patiently
Persistently
Intelligently
Smilingly
Ardently
Calmly
Thoroughly
Honestly
<seeds story>

S-ar putea să vă placă și