0% found this document useful (0 votes)
250 views62 pages

4 Numerical Differentiation Integration

This document outlines a lecture on numerical differentiation and integration. It introduces concepts like using interpolation methods like Newton's forward and backward formulas to numerically estimate derivatives when only discrete function values are known. It also covers techniques like the trapezoidal rule to numerically approximate integrals of functions. Examples are provided to demonstrate finding derivatives and maximum/minimum values, as well as computing integrals using rules like the trapezoidal rule. The document concludes with problems for students to work through related to numerical differentiation and integration.

Uploaded by

Ragnar Lothbrok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
250 views62 pages

4 Numerical Differentiation Integration

This document outlines a lecture on numerical differentiation and integration. It introduces concepts like using interpolation methods like Newton's forward and backward formulas to numerically estimate derivatives when only discrete function values are known. It also covers techniques like the trapezoidal rule to numerically approximate integrals of functions. Examples are provided to demonstrate finding derivatives and maximum/minimum values, as well as computing integrals using rules like the trapezoidal rule. The document concludes with problems for students to work through related to numerical differentiation and integration.

Uploaded by

Ragnar Lothbrok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

NUMERICAL METHODS

(MCSC-202)

By
Samir Shrestha, PhD
Department of Mathematics
Kathmandu University, Dhulikhel

Lecture 1
Chap-4: Numerical Differentiation &
Integration 1
Chap-4: Numerical Differentiation &
Integration

Outline

• Introduction
• Numerical Differentiaion formulas based on
• Newton‘s Forward Interpolation Method
• Newton‘s Backward Interpolation Method
• Stirling‘s Formula
• Maximimum and Minimum values
• Numerical Integraion
- Trapezoidal, Simpson‘s 1/3, Simpson‘s 3/8 Rules
• Numerical Double Integration
• Examples and Class work
4
Chap-4: Numerical Differentiation &
Integration

Introduction
to
Numerical Differentiation &
Integration

5
Chap-4: Numerical Differentiation &
Integration
Introduction:
• Differentiation and integration of a function arises quite often
in engineering and science problems
• If the function is given explicitly its derivative and in many
cases the integration can be found exactly
• However in many situations, we may not know the exact
function function but what we know is only the values of the
function in the discrete set of point 𝑥𝑖 , 𝑦𝑖 , 𝑖 = 0,1,2, … , 𝑛
• In some situation function is known but too complex to do
differentiation and integration
• In both the situations, we seek the help of numerical
techniques to compute the differentiation and integration
• Process of estimating the differentiation and integration using
the approximatation techniues is known as Numerical
Differentiaon and Numerical Integration
6
Chap-4: Numerical Differentiation &
Introduction: Continues … Integration

Idea !!!
• From the given set of data points 𝑥𝑖 , 𝑦𝑖 , 𝑖 = 0,1,2, … , 𝑛, we
construct the interpolating polynomial 𝑦 = 𝑦𝑛 (𝑥) that we
learned in Interpolation-Chapter 3
• Then, the derivatives and integrations can be very easily
performed on such interpolating polynomials
𝒚 𝒚 = 𝒚𝒏 (𝒙)

𝒙
7
Chap-4: Numerical Differentiation &
Integration

Numerical Differentiation
• Differentiation formula will be developed by using
Newton‘s forward interpolation

• Differentiation formula will be developed by using


Newton‘s backward interpolation

• Differentiation formula will be developed by Stirling‘s


interpolation
8
Chap-4: Numerical Differentiation &
Numerical Differentiation Formulas: Integration

(1)

(2)

𝑝=0

(3)
9
Chap-4: Numerical Differentiation &
Numerical Differentiation Formulas: Integration

(4)

(5)

10
Chap-4: Numerical Differentiation &
Numerical Differentiation Formulas: Integration

(6)

(7)

11
Chap-4: Numerical Differentiation &
Numerical Differentiation Formulas: Integration

(8)

(9)

12
Chap-4: Numerical Differentiation &
Integration

Examples
Finding the Derivatives

13
Chap-4: Numerical Differentiation &
Integration

14
Chap-4: Numerical Differentiation &
Integration

15
Chap-4: Numerical Differentiation &
Integration

16
Chap-4: Numerical Differentiation &
Integration

with 𝑥𝑛 = 2.0

17
Chap-4: Numerical Differentiation &
Integration
with 𝑥𝑛 = 2.0

18
Chap-4: Numerical Differentiation &
Integration

19
Chap-4: Numerical Differentiation &
Integration

20
Chapter-4
Classwork
Numerical Differentiation
𝑑𝑦 𝑑 2 𝑦
Problem 1: Compute the first and second derivatives , at the
𝑑𝑥 𝑑𝑥 2
points 𝑥 = 0 and 𝑥 = 6 using the following tabulated data:
𝑥 0 1 2 3 4 5 6
𝑦 2 3 10 29 66 127 218

Problem 2: Apply the Striling’s formula to compute the derivatives


𝑑𝑦 𝑑 2 𝑦
, of the function at the points 𝑥 = 1.4 by using the following
𝑑𝑥 𝑑𝑥 2
tabulated data:
𝑥 1.0 1.2 1.4 1.6 1.8
𝑦 2.7183 3.3201 4.0552 4.9530 6.0496
21
Chapter-4
Classwork
Numerical Differentiation
Problem 3:

Problem 4:

22
Chap-4: Numerical Differentiation &
Integration

Maximum and Minimum Values

23
Chap-4: Numerical Differentiation &
Integration

24
Chap-4: Numerical Differentiation &
Integration

25
Chap-4: Numerical Differentiation &
Integration

Examples
Finding Maximum/Minimum Values

26
Chap-4: Numerical Differentiation &
Integration

27
Chap-4: Numerical Differentiation &
Integration

28
Chapter-4
Classwork
Maximum/Minimum Values
Problem 1:

29
Numerical Differentiation
Thursday, February 10, 2022 7:41 AM

Max_Min_Example Page 1
Max_Min_Example Page 2
Chap-4: Numerical Differentiation &
Integration

Numerical Integration
• If tabulated data 𝑥𝑖 , 𝑦𝑖 , 𝑖 = 0,1,2, … , 𝑛 of unkown function𝑦 =
𝑏
𝑦(𝑥) and asked to evaluate 𝑎 𝑦𝑑𝑥
𝑏 −𝑥 2
• The function integral of type 𝑎
𝑒 𝑑𝑥 to be evaluated, which
2
can not be done exaclty as 𝑒 −𝑥 has not anti-derivative
• In both the situations above, we need to appy numerical methods
of integraions
• Idea is to construct the interpolating polynomial 𝑦 = 𝑦𝑛 (𝑥) using
the given set of data point (𝑥𝑖 , 𝑦𝑖 ) and the integrand function is
replaced by interpolating polynomial 𝑦 = 𝑦𝑛 (𝑥) so that
𝑏 𝑏
𝑎
𝑦𝑑𝑥 ≈ 𝑎 𝑛
𝑦 𝑑𝑥
30
Chap-4: Numerical Differentiation &
Integration

31
General formula for Numerical Integration: Chap-4: Numerical Differentiation &
Integration

32
Chap-4: Numerical Differentiation &
Integration

Trapezoidal Rule

33
Chap-4: Numerical Differentiation &
Integration

34
Trapezoidal Rule: Continue ... Chap-4: Numerical Differentiation &
Integration

35
Chap-4: Numerical Differentiation &
Integration

Simpson’s 1/3- Rule

36
Chap-4: Numerical Differentiation &
Integration

37
Simpson‘s 1/3 Rule: Continue ... Chap-4: Numerical Differentiation &
Integration

38
Chap-4: Numerical Differentiation &
Integration

Simpson’s 3/8- Rule

39
Chap-4: Numerical Differentiation &
Integration

40
Simpson‘s 3/8 Rule: Continue ... Chap-4: Numerical Differentiation &
Integration

41
Chap-4: Numerical Differentiation &
Integration

Examples
Trapezoidal and Simpson‘s-1/3

42
Chap-4: Numerical Differentiation &
Integration

43
Chap-4: Numerical Differentiation &
Integration

44
Chap-4: Numerical Differentiation &
Integration

45
Chap-4: Numerical Differentiation &
Integration

𝒉 Trapezoidal Simpson‘s-1/3 Exact


0.5 0.7084 0.6945 0.693147
0.25 0.6970 0.6932 0.693147
0.125 0.6941 0.6932 0.693147
46
Chap-4: Numerical Differentiation &
Integration

47
Chap-4: Numerical Differentiation &
Integration

48
Chap-4: Numerical Differentiation &
Integration

49
Chapter-4
Classwork
Numerical Integration
𝜋
Problem 1: Evaluate the integral 0
𝑥 𝑠𝑖𝑛𝑥 𝑑𝑥 using Trapezoidal rule
with five ordinates.

31
Problem 2: Estimate the value of the integral 1 𝑑𝑥 by Simpson’s-1/3
𝑥
with 4 strips and 8 strips respectively. Determine the error in each
case.

50
Chapter-4
Classwork
Numerical Integration
Problem 3: The velocities of a car (running on a straight road) at
interval of 2 minutes are given below.
Time in minutes 0 2 4 6 8 10 12
Velocity in k.m 0 22 30 27 18 7 0

Apply the Simpson’s-1/3-Rule to find the distance covered by the car.

Problem 4: A curve 𝑦 = 𝑓(𝑥) is given by the points of the table given


below:
𝑥 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0
𝑦 23 19 14 11 12.5 16 19 20 20

Estimate the area bounded by the curve, the x-axis and the extreme
ordinates. 51
Numerical Integration
Thursday, February 17, 2022 9:03 AM

Interpolation Page 1
Interpolation Page 2
Interpolation Page 3
Numerical Double Integration
Friday, February 11, 2022 11:34 AM

Interpolation Page 1
Interpolation Page 2
Interpolation Page 3
Interpolation Page 4
Interpolation Page 5
Interpolation Page 6
Chap-4: Numerical Differentiation &
Integration

Numerical Double Integration


Left for students to prepare

52
End of Lecture-1

Next
Chapter-5
Least Square Curve Fitting

53

You might also like