Numerical Methods - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Numerical Methods

Description:

Trapezium Rule ... How do we calculate the area of each trapezium? ... Use the Trapezium rule to find an estimate for the area under the curve f(x) and ... – PowerPoint PPT presentation

Number of Views:194
Avg rating:3.0/5.0
Slides: 18
Provided by: bengr1
Category:

less

Transcript and Presenter's Notes

Title: Numerical Methods


1
Numerical Methods
  • Lesson 1
  • Numerical Integration

2
Numerical Integration
  • In mathematics it is very useful to calculate the
    area under the curve.
  • This process is known as integration and you have
    already met this in your main A level.
  • However there are often occasions where we are
    unable to integrate certain functions to
    calculate the area.
  • This is were we would use a numerical method.
  • We need to estimate the area underneath the
    curve.
  • There are three methods that we are going to
    study.
  • Mid-Point rule
  • Trapezium rule
  • Simpsons rule
  • We will start with the Mid-Point rule.

3
Mid-Point Rule
  • The Mid-Point rule uses rectangles to estimate
    the area under the curve.
  • You use the mid-point of the interval you are
    trying to integrate, go up to the curve and draw
    a rectangle.
  • This rectangle is used as an estimate for the
    area under the curve.
  • You can see from the diagram that the more
    rectangles you use the better the estimate
    becomes.

4
Mid-Point Rule
  • Lets look at an example with n 4.
  • We are looking to integrate between the limits a
    b.
  • We divide the interval up into 4 equal bars.
  • Each bar will have a width of h. Where
  • The height of each bar will be f(mn)
  • Now the estimate for the area will be area 1
    area 2 area 3 area 4.
  • Area hf(m1) hf(m2) hf(m3) hf(m4)
  • h(f(m1) f(m2) f(m3) f(m4) )

yf(x)
f(m2)
f(m3)
f(m4)
f(m1)
2
3
4
1
h
a
b
m1
m2
m3
m4
5
Mid-Point Rule
  • To calculate the areas of the bars we also need
    to find the values of m1 , m2 , m3 , m4,
  • M1 a h/2
  • M2 a 3h/2
  • M3 a 5h/2
  • M4 a 7h/2

yf(x)
f(m2)
f(m3)
  • This estimate for the area is known as M4 as it
    uses four bars.

f(m4)
f(m1)
2
3
4
1
h
a
b
m1
m2
m3
m4
6
Mid-Point Rule
  • So in general
  • Mn hf(m1) f(m2) f(m3) .. f(mn)
  • Where the mn are the midpoints of each bar and h
    is the width of each bar.
  • m1 a h/2
  • m2 a 3h/2
  • m3 a 5h/2
  • ..
  • mn a (2n 1)h/2

yf(x)
f(m2)
f(m3)
f(m4)
f(m1)
2
3
4
1
h
a
b
m1
m2
m3
m4
7
Example 1
  • Use the Mid-Point rule to find an estimate for
    the area under the curve f(x) and the limits 0
    and 1 and n 1,2,4,8.
  • Where

8
Trapezium Rule
  • Another method for estimating the area under a
    curve is the trapezium rule.
  • You need to be able to calculate the area of a
    trapezium.
  • Calculate the area of the trapezium below.

5cm
7cm
6cm
9cm
9
Trapezium Rule
  • With the trapezium rule you basically divide the
    area under the curve into trapeziums of equal
    height.
  • You can then use the combined area of the
    trapeziums as an estimate for the area under the
    curve.
  • The more trapeziums there are under the curve
    then the more accurate the estimate becomes.
  • What will the estimate for this example be in
    comparison to the real answer?
  • In this case you would have an under estimate as
    all the trapeziums are below the curve.

10
Trapezium Rule
  • We are looking to find the area between the curve
    the x-axis and two limits a and b.
  • For this example we are going to estimate the
    area by breaking it up in to 4 trapeziums.
  • Each trapezium will have an equal height (h).
  • What will be the formula for h?

2
3
  • Now Area area 1 area 2 area 3 area 4.
  • How do we calculate the area of each trapezium?
  • We need to know the lengths of each of the orange
    bars.

4
1
h
a
b
11
Trapezium Rule
  • What will be the x values for each of the bars?

2
3
4
1
h
a
b
ah
a2h
a3h
12
Trapezium Rule
  • The equation of the curve is y f(x).
  • So the height of the first bar will be f(a).
  • The height of the next will be f(ah) and so on.
  • From this and the area of a trapezium we get

yf(x)
f(a2h)
f(ah)
f(a3h)
f(b)
2
3
4
f(a)
1
h
a
b
ah
a2h
a3h
13
Trapezium Rule
  • This is getting a bit messy so lets change the
    notation a bit.
  • Let f(a) f0, f(ah) f1, ., f(anh) f(b)
    fn

yf(x)
f(a2h)
f(ah)
f(ah)
f(b)
2
3
4
f(a)
1
h
a
b
ah
a2h
a3h
14
Trapezium Rule
  • This is getting a bit messy so lets change the
    notation a bit.
  • Let f(a) f0, f(ah) f1, ., f(anh) f(b)
    fn

yf(x)
f2
f1
f3
f4
2
3
4
f0
1
h
a
b
ah
a2h
a3h
15
Trapezium Rule
yf(x)
f2
f1
f3
  • First we sum

f4
2
3
4
f0
1
h
a
b
ah
a2h
a3h
16
Trapezium Rule
yf(x)
f2
f1
  • Finally, we could look at the case for n
    trapeziums.

f3
f4
2
3
4
f0
1
h
a
b
ah
a2h
a3h
17
Example 2
  • Use the Trapezium rule to find an estimate for
    the area under the curve f(x) and the limits 0
    and 1 and n 1,2,4,8.
  • Where
Write a Comment
User Comments (0)
About PowerShow.com