numerical methods - university of north carolina at charlotte · pdf filewhy use numerical...

14
Numerical Methods Why Use Numerical Methods? Most problems in engineering involve the following steps: Development of a mathematical model to represent/model a physical system or manufacturing process Derive governing equations by application of physical laws (New- ton’s laws, conservation of mass, energy, etc.) Solution of the equations Interpretation of the solution ITCS 4133/5133: Numerical Comp. Methods 1 Introduction

Upload: vungoc

Post on 21-Mar-2018

233 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Numerical Methods

Why Use Numerical Methods?

Most problems in engineering involve the following steps:

� Development of a mathematical model to represent/model a physicalsystem or manufacturing process

� Derive governing equations by application of physical laws (New-ton’s laws, conservation of mass, energy, etc.)

� Solution of the equations

� Interpretation of the solution

ITCS 4133/5133: Numerical Comp. Methods 1 Introduction

Page 2: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Difficulties in Solution of Equations

� Equations may be linear or non-linear, may be ordinary or partialdifferential equations, or equations involving integrals or derivatives

� Equations may or may not admit closed form or analytic solutions

� Very few practical systems admit analytical solutions

� Analytical solutions require simplifying assumptions

What are Numerical Methods?

� Solutions that cannot be expressed in the form of mathematical ex-pressions (analytical form)

� Athough tedious and computationally intensive, the use of powerfuland inexpensive computers can be effectively used to find solutionsto complex engineering problems.

ITCS 4133/5133: Numerical Comp. Methods 2 Introduction

Page 3: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Example

Consider

I1 =

∫ b

a

xe−x2

dx

can be written as

I1 =

∫ b

a

d(−e−x2

2) =−e−x2

2

resulting in the analytical solution.

ITCS 4133/5133: Numerical Comp. Methods 3 Introduction

Page 4: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Example(contd)

However,

I2 =

∫ b

a

f (x)dx =

∫ b

a

e−x2

dx

does not have a closed form solution and requires a numerical evalua-tion.

Solution:

⇒ As the integral is simply the area under the curve f (x), break thisarea into small rectangular regions and sum up the areas

⇒ Relevant methods : Trapezoidal, Simpson Rules.

ITCS 4133/5133: Numerical Comp. Methods 4 Introduction

Page 5: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Sample Problems and Numerical Methods

Solutions(Roots) of Nonlinear Equations

� Can be algebraic, polynomial equation

� Generally of the form

f (x) = 0

� Goal is to solve the system (determine the roots)

� Applications: turbulent fluid flow, vibration systems

ITCS 4133/5133: Numerical Comp. Methods 5 Introduction

Page 6: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Sample Problem 1: Fixed-Point Iteration

� Equations of the form x2 = c, rewritten as x = 12(x + c

x), forming the

basis for an iterative solution.

ITCS 4133/5133: Numerical Comp. Methods 6 Introduction

Page 7: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Solutions of Simultaneous Linear Equations

� In applications such as heat transfer, fluid mechanics, the governingPDEs are solved using finite difference or finite element techniques

� This converts the problem into a system of linear algebraic equa-tions, which can be solved using techniques such as Gaussian elim-ination

� Example 2 variable system:

a1x1 + a2x2 = b1a3x1 + a4x2 = b2

ITCS 4133/5133: Numerical Comp. Methods 7 Introduction

Page 8: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Numerical Solution: Gaussian Elimination

ITCS 4133/5133: Numerical Comp. Methods 8 Introduction

Page 9: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Solutions of Eigen Value Problems

� In applications such as vibration of structures, we usually have a setof homogeneous linear algebraic equations

� If there are n equations, then there are n + 1 unknowns in thesesystems

� Example 2 equation system:

(a1 − λ)x1 + a2x2 = b1a3x1 + (a4 − λ)x2 = b2

where λ is the eigen value and ~X =

[x1x2

]is the Eigen vector are the

unknowns.

ITCS 4133/5133: Numerical Comp. Methods 9 Introduction

Page 10: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Curve Fitting and Interpolation

� These methods attempt to evaluate a function at unknown pointsusing the function values at known points

� Interpolation: Use function values at neighboring points to estimatefunction value at unknown point, for instance, using a weighted av-erage

� Curve Fitting: Use the known function values to fit a curve(linear,quadratic, cubic, etc); evaluate the curve at the unknown functionlocations.

ITCS 4133/5133: Numerical Comp. Methods 10 Introduction

Page 11: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Numerical Differentiation and Integration

� These methods provide ways to determine the derivative and inte-grals of functions that have known values at only limited numbers ofpoints and have no known expression.

� Can fit polynomial, and then determine the derivative or integral, oruse differencing or area estimation techniques.

ITCS 4133/5133: Numerical Comp. Methods 11 Introduction

Page 12: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Approximating an Integral:Trapezoid Rule

ITCS 4133/5133: Numerical Comp. Methods 12 Introduction

Page 13: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

Solution of Ordinary Differential Equations

� These arise in applications such as dynamics, heat and mass trans-fer, usually in the form of PDEs, which can be transformed intoODEs.

dy

dx= f (x, y)

� Can be solved by approximating the derivative as the slope of thefunction y(x) at different values of x.

y1 − y0 = f (x0, y0)(x1 − x0)

or

y1 = y0 + hf (x0, y0)

ITCS 4133/5133: Numerical Comp. Methods 13 Introduction

Page 14: Numerical Methods - University of North Carolina at Charlotte · PDF fileWhy Use Numerical Methods? Most problems in engineering involve the following steps: ... Sample Problems and

ITCS 4133/5133: Numerical Comp. Methods 14 Introduction