Dr. Samir AlAmer - PowerPoint PPT Presentation

1 / 67
About This Presentation
Title:

Dr. Samir AlAmer

Description:

The Taylor series converges fast (few terms are needed) when x is near the point ... series is a special case of Taylor series with the center of expansion c ... – PowerPoint PPT presentation

Number of Views:193
Avg rating:3.0/5.0
Slides: 68
Provided by: fadh3
Category:
Tags: alamer | samir | taylor

less

Transcript and Presenter's Notes

Title: Dr. Samir AlAmer


1
SE301 Numerical MethodsTopic 1
Introduction to Numerical methods and Taylor
SeriesLectures 1-4
  • Dr. Samir Al-Amer
  • (Term 061)

2
Dr. Samir Hasan Al-Amer?. ???? ??? ??????
  • Office Hours
  • Sat 900-1000, Monday 11-130 PM
  • by appointment
  • Office 22-141
  • Tel 860-3749
  • Email
  • samir_at_ccse.kfupm.edu.sa
  • use the WebCT email
  • Web page www.ccse.kfupm.edu.sa/samir

3
Grading Policy
  • Standard Grading policy will be adapted
  • class activities 9
  • Quizzes Computer Exam 16
  • HWsComputer Project 10
  • Major Exam 1 20
  • Major Exam 2 20
  • Final Exam 25

4
Rules and Regulations
  • No make up exams or quizzes
  • DN grade --- 8 unexcused absences
  • Homework Assignments are due to the beginning of
    the lectures.
  • Absence is not an excuse for not submitting the
    Homework.
  • Late submission may not be accepted
  • If accepted -25/day for late submission

5
Lecture 1Introduction to Numerical Methods
  • What are NUMERICAL METHODS?
  • Why do we need them?
  • Topics covered in SE301.
  • Reading Assignment pages 3-10 of text book

6
Numerical Methods
  • Numerical Methods
  • Algorithms that are used to obtain numerical
    solutions of a mathematical problem.
  • Why do we need them?
  • 1. No analytical solution exists,
  • 2. An analytical solution is difficult to
    obtain
  • or not practical.

7
What do we need
  • Basic Needs in the Numerical Methods
  • Practical
  • can be computed in a reasonable amount of
    time.
  • Accurate
  • Good approximate to the true value
  • Information about the approximation error
    (Bounds, error order, )

8
Outlines of the Course
  • Taylor Theorem
  • Number Representation
  • Solution of nonlinear Equations
  • Interpolation
  • Numerical Differentiation
  • Numerical Integration
  • Solution of linear Equations
  • Least Squares curve fitting
  • Solution of ordinary differential equations
  • Solution of Partial differential equations

9
Solution of Nonlinear Equations
  • Some simple equations can be solved analytically
  • Many other equations have no analytical solution

10
Methods for solving Nonlinear Equations
  • Bisection Method
  • Newton-Raphson Method
  • Secant Method

11
Solution of Systems ofLinear Equations
12
Cramers Rule is not practical
13
Methods for solving Systems of Linear Equations
  • Naive Gaussian Elimination
  • Gaussian Elimination with Scaled Partial pivoting
  • Algorithm for Tri-diagonal Equations

14
Curve Fitting
  • Given a set of data
  • Select a curve that best fit the data. One choice
    is find the curve so that the sum of the square
    of the error is minimized.

15
Interpolation
  • Given a set of data
  • find a polynomial P(x) whose graph passes through
    all tabulated points.

16
Methods for Curve Fitting
  • Least Squares
  • Linear Regression
  • Nonlinear least Squares Problems
  • Interpolation
  • Newton polynomial interpolation
  • Lagrange interpolation

17
Integration
  • Some functions can be integrated analytically

18
Methods for Numerical Integration
  • Upper and Lower Sums
  • Trapezoid Method
  • Romberg Method
  • Gauss Quadrature

19
Solution of Ordinary Differential Equations
20
Solution of Partial Differential Equations
  • Partial Differential Equations are more difficult
    to solve than ordinary differential equations

21
Summary
  • Numerical Methods
  • Algorithms that are used to obtain numerical
    solution of a mathematical problem.
  • We need them when
  • No analytical solution exist or it is
    difficult to obtain.

Topics Covered in the Course
  • Solution of nonlinear Equations
  • Solution of linear Equations
  • Curve fitting
  • Least Squares
  • Interpolation
  • Numerical Integration
  • Numerical Differentiation
  • Solution of ordinary differential equations
  • Solution of Partial differential equations

22
Lecture 2 Number Representation and accurcy
  • Number Representation
  • Normalized Floating Point Representation
  • Significant Digits
  • Accuracy and Precision
  • Rounding and Chopping
  • Reading assignment Chapter 3

23
Representing Real Numbers
  • You are familiar with the decimal system
  • Decimal System Base 10 , Digits(0,1,9)
  • Standard Representations

24
Normalized Floating Point Representation
  • Normalized Floating Point Representation
  • No integral part,
  • Advantage Efficient in representing very small or
    very large numbers

25
Calculator Example
  • suppose you want to compute
  • 3.578 2.139
  • using a calculator with two-digit fractions

3.57

2.13
7.60

7.653342
True answer
26
Binary System
  • Binary System Base2, Digits0,1

27
7-Bit Representation(sign 1 bit, Mantissa
3bits,exponent 3 bits)
28
Fact
  • Number that have finite expansion in one
    numbering system may have an infinite expansion
    in another numbering system
  • You can never represent 0.1 exactly in any
    computer

29
Representation
Hypothetical Machine (real computers use 23 bit
mantissa) Mantissa 2 bits exponent 2 bit
sign 1 bit Possible machine numbers .25
.3125 .375 .4375 .5 .625 .75 .875 1
1.25 1.5 1.75
30
Representation
Gap near zero
31
Remarks
  • Numbers that can be exactly represented are
    called machine numbers
  • Difference between machine numbers is not uniform
  • sum of machine numbers is not necessarily
    a machine number
  • 0.25 .3125 0.5625 (not a machine
    number)

32
Significant Digits
  • Significant digits are those digits that can be
    used with confidence.

33
48.9
34
Accuracy and Precision
  • Accuracy is related to closeness to the true
    value
  • Precision is related to the closeness to other
    estimated values

35
(No Transcript)
36
Rounding and Chopping
  • Rounding Replace the number by the nearest
  • machine number
  • Chopping Throw all extra digits

37
Fig 3.7
38
Error DefinitionsTrue Error
  • can be computed if the true value is known

39
Error DefinitionsEstimated error
  • When the true value is not known

40
Notation
  • We say the estimate is correct to n decimal
    digits if
  • We say the estimate is correct to n decimal
    digits rounded if

41
Summary
  • Number Representation
  • Number that have finite expansion in one
    numbering system may
  • have an infinite expansion in another
    numbering system.
  • Normalized Floating Point Representation
  • Efficient in representing very small or very
    large numbers
  • Difference between machine numbers is not uniform
  • Representation error depends on the number of
    bits used in the mantissa.

42
Lecture 3Taylor Theorem
  • Motivation
  • Taylor Theorem
  • Examples
  • Reading assignment Chapter 4

43
Motivation
  • We can easily compute things like

b
a
0.6
44
Taylor Series
45
Taylor SeriesExample 1
46
Taylor SeriesExample 1
47
Taylor SeriesExample 2
48
(No Transcript)
49
Convergence of Taylor Series(Observations,
Example 1)
  • The Taylor series converges fast (few terms are
    needed) when x is near the point of expansion. If
    x-c is large then more terms are needed to
    get good approximation.

50
Taylor SeriesExample 3
51
Example 3remarks
  • Can we apply Taylor series for xgt1??
  • How many terms are needed to get good
    approximation???

These questions will be answered using Taylor
Theorem
52
Taylor Theorem
(n1) terms Truncated Taylor Series
Reminder
53
Taylor Theorem
54
Error Term
55
Error Term forExample 4
56
Alternative form of Taylor Theorem
57
Taylor TheoremAlternative forms
58
Mean Value Theorem
59
Alternating Series Theorem
60
Alternating SeriesExample 5
61
Example 6
62
Example 6
63
Example 6Error term
64
Remark
  • In this course all angles are assumed to be in
    radian unless you are told otherwise

65
Maclurine series
  • Find Maclurine series expansion of cos (x)

Maclurine series is a special case of Taylor
series with the center of expansion c 0
66
Taylor SeriesExample 7
67
Homework problems
  • Check the course webCT for the Homework Assignment
Write a Comment
User Comments (0)
About PowerShow.com