5.5 numerical integration

19
5.5 Numerical Integration

Upload: amandla

Post on 04-Jan-2016

35 views

Category:

Documents


1 download

DESCRIPTION

5.5 Numerical Integration. Using integrals to find area works extremely well as long as we can find the antiderivative of the function. But what if we can’t find the anti-derivative?. What if we don’t even have a function, but only a table of data measurements taken from real life?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 5.5  Numerical Integration

5.5 Numerical Integration

Page 2: 5.5  Numerical Integration

Using integrals to find area works extremely well as long as we can find the antiderivative of the function.

But what if we can’t find the anti-derivative?

What if we don’t even have a function, but only a table of data measurements taken from real life?

Page 3: 5.5  Numerical Integration

211

8y x

43

0

1

24A x x

4 2

0

11

8A x dx

0 4x

Actual area under curve:

20

3A 6.6

Page 4: 5.5  Numerical Integration

211

8y x 0 4x

Left-hand rectangular approximation:

Approximate area:1 1 1 3

1 1 1 2 5 5.758 2 8 4

(too low)

Page 5: 5.5  Numerical Integration

Approximate area: 1 1 1 31 1 2 3 7 7.75

8 2 8 4

211

8y x 0 4x

Right-hand rectangular approximation:

(too high)

Page 6: 5.5  Numerical Integration

Averaging right and left rectangles…

1 9 1 9 3 1 3 17 1 171 3

2 8 2 8 2 2 2 8 2 8T

)(2

121 hhbT

…produces the area of a trapezoid:

Page 7: 5.5  Numerical Integration

1 9 1 9 3 1 3 17 1 171 3

2 8 2 8 2 2 2 8 2 8T

)(2

121 hhbT

The area of a trapezoid can be found with the formula:

Page 8: 5.5  Numerical Integration

1 9 1 9 3 1 3 17 1 171 3

2 8 2 8 2 2 2 8 2 8T

1 9 9 3 3 17 171 3

2 8 8 2 2 8 8T

1 27

2 2T

27

4 6.75

)(2

121 hhbT

The area of a trapezoid can be found with the formula:

Page 9: 5.5  Numerical Integration

)(2

121 hhbT

The area of a trapezoid can be found with the formula:

Notice how all the values in the middle show up twice when summing the areas of each trapezoid.

This allows us to come up with a simple general formula called…

1 9 1 9 3 1 3 17 1 171 3

2 8 2 8 2 2 2 8 2 8T

Page 10: 5.5  Numerical Integration

This gives us a better approximation than either left or right rectangles.

Trapezoidal Rule:

( Δx = width of subinterval )

T x

2(y0 2y1 2y2 ... 2yn 1 yn )

( n = number of subintervals )

This also assumes that each trapezoid will have the same base. As you will see on your homework, that will not always be the case. When it happens, I’m sorry to say, you will simply have to work out each area one trapezoid at a time.

Page 11: 5.5  Numerical Integration

This is an even more efficient method than the Trapezoidal Rule but we won’t go into how it is derived. Instead, we’ll just demonstrate how it is used so you can use it in your work.

Simpson’s Rule:

(Δx = width of subinterval, n must be even )

S x

2(y0 4y1 2y2 4y3 ... 2yn 2 4 yn 1 yn )

Page 12: 5.5  Numerical Integration

Example: 211

8y x 1 9 3 17

1 4 2 4 33 8 2 8

S

1 9 171 3 3

3 2 2

120

3 6.6

Simpson’s Rule:

(Δx = width of subinterval, n must be even )

S x

2(y0 4y1 2y2 4y3 ... 2yn 2 4 yn 1 yn )

Page 13: 5.5  Numerical Integration

Simpson’s rule can also be interpreted as fitting parabolas to sections of the curve, which is why this example came out exactly. With a quadratic or cubic function, this rule will actually give an exact answer. The proof would just be too long to include here but…

Simpson’s rule will usually give a very good approximation with relatively few subintervals. With Simpson’s Rule, however, the number of subintervals must be even.

It can be a useful approximation when we have no equation, the data points are determined experimentally, and when there is evidence that the projected graph through the points is a curve.

Like in this example…

Page 14: 5.5  Numerical Integration

Will has once again tempted fate by climbing into a faulty rocket as it climbs and falls yet again. Justin doesn’t have an equation for the rocket’s position but he does have a speed gun and is able to record the rocket’s velocity from launch to crash 15 seconds later. He takes this data down and creates the following table:

Page 15: 5.5  Numerical Integration

t v(t)0 01 2252 4003 5254 6005 6256 6007 5258 4009 225

10 011 -27512 -60013 -97514 -140015 -1875

Where t is given in seconds and v(t) is given in feet/second.

Approximate the rocket’s maximum height

First, make a graph…

Page 16: 5.5  Numerical Integration

t v(t)0 01 2252 4003 5254 6005 6256 6007 5258 4009 225

10 011 -27512 -60013 -97514 -140015 -1875

Since the rocket’s maximum height occurs at 10 seconds (where the positive velocity area ends), we can use either the trapezoid rule or Simpson’s rule to make our approximation. As long as we’re here, let’s use both.

Page 17: 5.5  Numerical Integration

The trapezoid rule gives us…

2

1[0 + 2(225 + 400 + 525 + 600 + 625 + 600 + 525 + 400 + 225) + 0]

4125 feet

Simpson’s rule gives us…

3

1 [ 2(2*225 + 400 + 2*525 + 600 + 2*625 + 600 + 2*525 + 400 + 2*225) ]

4166.67

Page 18: 5.5  Numerical Integration

Given the conditions of this problem, what should be true about the areas of these two shaded regions?

They should be equal and therefore…

0)(15

0 dttv

Because the rocket should have hit the ground at t = 15 and therefore it’s displacement is 0

Page 19: 5.5  Numerical Integration

The End