cs 2262: numerical methods

24
CS 2262: Numerical Methods Schedule: TTh 3:10-4:30 Room: Turead 0229 Instructor: Rahul Shah Office: 285 Coates Phone: 578-4355 Office Hours: Wed 2:30-4:30, Th 11-12 Email: [email protected] Web: http://www.csc.lsu.edu/~rahul/2262 Text: Atkinson and Han, Elementary Numerical Analysis, 3rd edition, John Wiley & Sons, Inc., 2004 Grader: ?

Upload: saddam

Post on 22-Jan-2016

61 views

Category:

Documents


1 download

DESCRIPTION

CS 2262: Numerical Methods. Schedule : TTh 3:10-4:30 Room: Turead 0229 Instructor : Rahul Shah Office : 285 Coates Phone : 578-4355 Office Hours : Wed 2:30-4:30, Th 11-12 Email: [email protected] Web: http://www.csc.lsu.edu/~rahul/2262 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS 2262: Numerical Methods

CS 2262: Numerical Methods

Schedule: TTh 3:10-4:30Room: Turead 0229Instructor: Rahul ShahOffice: 285 CoatesPhone: 578-4355 Office Hours: Wed 2:30-4:30, Th 11-12Email: [email protected]: http://www.csc.lsu.edu/~rahul/2262Text: Atkinson and Han, Elementary Numerical Analysis, 3rd edition, John Wiley & Sons, Inc., 2004

Grader: ?

Page 2: CS 2262: Numerical Methods

Grading

• Midterm : 30 %• Final : 30%• Homework/Project: 25+10 = 35%• Class Participation : 5%• Relative – on the curve• Homeworks will involve writing Matlab programs

…about 4 to 5 of them• Mini project will involve solving real-life problem

using Matlab and/or C

Page 3: CS 2262: Numerical Methods

Prerequisites and Background

• Math 1552 and

• CS 1251 or 1351 or 2290

• The course will involve concepts from– Calculus– Linear Algebra

• Programming – Matlab– C

Page 4: CS 2262: Numerical Methods

Applications of this course

Numerical Methods

Data Mining

Algorithms/Optimization

Solving large scale systems

Sales dataSearch Engines Network problems

Fluid dynamics

Stock Market

Page 5: CS 2262: Numerical Methods

Course Contents

• Foundations: Calculus, Computer Architecture, Matlab

• Taylor Series• Root Finding• Polynomial Interpolation• Numerical Integration/Differentiation• Linear Equations/Matrices• Differential Equations

Page 6: CS 2262: Numerical Methods

Overview

• Taylor Series– Evaluationg functions like sin x, ex etc– Processors only have support for additions

and multiplications– Errors involved, number of iterations needed

Page 7: CS 2262: Numerical Methods

Overview: Root finding

• Reverse process of evaluating the function

• Given function f, find the value of x such that f(x) = 0

• Methods for general functions

• Methods for polynomials

• Rate of convergence

Page 8: CS 2262: Numerical Methods

Interpolation

• Given a set of points (x1, y1) , (x2, y2), …, (xn, yn)

– Find a polynomial which passes through them– Find a line which fits these the best– Find a smooth curve which passes through

them

Page 9: CS 2262: Numerical Methods

Matrices

• Given a set of n linear equations in variables x1, x2, x3, …, xn

– Find the values of xi s

– Find best values of xi s • Linear programming , Optimization

• Find Eigenvalues of the matrix– Google– Differential Equations

Page 10: CS 2262: Numerical Methods

Differential Equations

• Modelling/Simulations of Engineering systems

• Population Modeling

• Financial Models, Stocks/Options pricing

Page 11: CS 2262: Numerical Methods

Motivation1: Modelling• Traditionally, engineering and science had a two-sided

approach to understanding a subject: the theoretical and the experimental. More recently, a third approach has become equally important: the computational.

• Traditionally we would build an understanding by building theoretical mathematical models, and we would solve these for special cases. For example, we would study the flow of an incompressible irrotational fluid past a sphere, obtaining some idea of the nature of fluid flow. But more practical situations could seldom be handled by direct means, because the needed equations were too difficult to solve. Thus we also used the experimental approach to obtain better information about the flow of practical fluids. The theory would suggest ideas to be tried in the laboratory, and the experiemental results would often suggest directions for a further development of theory.

Page 12: CS 2262: Numerical Methods

Modeling contd

Theoretical Science

Experimental Science Computational Science

Page 13: CS 2262: Numerical Methods

Modeling: Population

• This is the simplest model for population growth. Let N(t) denote the number of individuals in a population (rabbits, people, bacteria, etc). Then we model its growth by– N’(t) = cN(t), t≥ 0, N(t0) = N0

• The constant c is the growth constant, and it usually must be determined empirically.

• Over short periods of time, this is often an accurate model for population growth. For example, it accurately models the growth of US population over the period of 1790 to 1860, with c = 0.2975.

Page 14: CS 2262: Numerical Methods

Population Data

Page 15: CS 2262: Numerical Methods

Predator-Prey

• Let F(t) denote the number of foxes at time t; and let R(t) denote the number of rabbits at time t. A simple model for these populations is called the Lotka-Volterra predator-prey model:– dR/dt = a [1 − bF(t)] R(t)– dF/dt = c [−1 + gR(t)] F(t)– with a, b, c, g positive constants.

• If one looks carefully at this, then one can see how it is built from the logistic equation. In some cases, this is a very useful model and agrees with physical experiments. Of course, we can substitute other interpretations, replacing foxes and rabbits with other predator and prey. The model will fail, however, when there are other populations that affect the first two populations in a significant way.

Page 16: CS 2262: Numerical Methods

Motivation2: Google

• Term frequency, location, meaning based search engines : Altavista, Lycos etc

• Spamming

• Google used social concepts to reduce effect of spamming

• A webpage is good if many good webpages link to it

• So how to find goodness score

Page 17: CS 2262: Numerical Methods

Google contd..

• Say there a n webpages• Construct a n x n probability matrix

– With A[i,j] = likelihood that a user will jump to page j from i

• Find dominant eigenvalue of this matrix• Corresponding eigenvector gives the goodness

scores• How to solve the problem on such a large scale,

which method to use, how many iterations, etc

Page 18: CS 2262: Numerical Methods

Foundations: Calculus

• Intermediate Value Theorem

• Mean Value Theorem

• Extended Mean Value Theorem

• Integral Mean Value Theorem

Page 19: CS 2262: Numerical Methods

Intermediate Value Theorem

• Let f(x) be a continuous function in interval a ≤ x ≤ b, – Let M = max f(x) in the interval [a,b]– Let m = min f(x) in [a,b]

• Then, for any value v such that m ≤ v ≤ M– There is at least one point c such that f(c) = v.

Page 20: CS 2262: Numerical Methods

IVT

Page 21: CS 2262: Numerical Methods

Mean Value Theroem

• Let f(x) be continuous and differentiable on [a,b]

• Then there is at least one point c in (a,b)– Such that f(b) – f(a) = f’(c) (b-a)

Page 22: CS 2262: Numerical Methods

MVT

Page 23: CS 2262: Numerical Methods

Extension

• Let f(x) be continuous and n-times differentiable on [a,b]– Then there is c such that f(b) = f(a) + f’(c)(b-a)– There is d such that f(b) = f(a) + f’(a) (b-a) +

f’’(d) (b-a)2/2– …..– There is t in [a,b], such that f(b) = f(a) + f’(a)(b-

a) + f’’(a) (b-a)2/2 …+ f(n-1) (a) (b-a)n-1/(n-1)! + f(n) (t) (b-a)n/n!

Page 24: CS 2262: Numerical Methods