Transcription of MATHEMATICS FOR ENGINEERING INTEGRATION …
1 1 mathematics for engineering integration tutorial 3 - NUMERICAL INTEGRATION METHODS This tutorial is essential pre-requisite material for anyone studying mechanical ENGINEERING . This tutorial uses the principle of learning by example. The approach is practical rather than purely mathematical. On completion of this tutorial you should be able to do the following. Revise basic INTEGRATION . Find the areas under graphs of known functions. Define ordinates and mid-ordinates. Use the mid-ordinate rule. Use the trapezoidal rule. Use Simpson's Rule Apply the methods to real ENGINEERING problems. 2 NUMERICAL METHODS FOR INTEGRATION 1. REVISION OF INTEGRATION Lets consider how to find the area under the graph of y = f(x) =3 + x2.
2 A graph of this function looks like this. Figure 1 If we solve the area by use of calculus (see tutorial 1) the area would be precisely solved as follows. Over the range x = 0 to x = 10 the area is expressed as follows. 4x0x2)dxx(3A Carrying out the INTEGRATION gives the following. 4034x0x23x3x)dxx(3A Evaluating between limits we get the following. units x 3344 x 33x3x)dxx(3A334034x0x2 This is a precise answer and we will compare it with the results found in the following work. 3 2. GRAPHICAL METHODS Consider the same function again and this time more grid lines are shown. Figure 2 COUNTING RECTANGLES A simple but crude way to find the area under the graph is to count the rectangles.
3 Each rectangle on the graph above has an area of 1 unit. Count them up judging the divided ones to the nearest half. You should get an answer of about 34 units depending on hw good you are at ding it. MID-ORDINATE RULE The values of y corresponding to x = 0, x = 1, x = 2 and so on are called the ordinates. The values of y corresponding to x = , x = , x = and so on are called the mid-ordinates. Each column is approximately a rectangle w wide and h high. The area is approximately w h. The area under the whole graph is approximately A = w h1 + w h2 + w h3 +w h4 A = w(h1 + h2 + h3 + h4) Usually, as in this case, w =1 Putting in the mid-ordinate values we find the following. A = 1( + + + ) = 33 units Figure 3 Clearly if we took more strips by say making w = , we would get a more accurate answer and in the limits as w becomes very small the answer will be the same as found by integrating.
4 4 TRAPEZOIDAL RULE Consider that each strip has a straight line joining the top corners as shown. The height at the middle is not quite the same as the mid-ordinate and is the average of the two ordinates. If h is the average then h1 = (A+B)/2 h2 = (B+ C)/2 h3 = (C+ D)/2 h4 = (D+E)/2 The area of each strip is wh1 = w(A+B)/2 wh2 = w(B+ C)/2 wh3 = w(C+ D)/2 wh4 = w(D+E)/2 The total area is A = (w/2)[(A+B) + (B+C) + (C+D) + (D+E)] A = (w/2)[(A+B + B+C + C+D + D+E] A = (w/2)[(A + E) + 2(B+C+D)] Figure 4 Hence in our example A = (1/2)[(3+19) +2(4+7+12)] = (1/2)(22+46) = 34 This is slightly larger than the correct figure but again, if smaller strips are used, the answer will be accurate.)
5 The above rule may be written as follows. rest theof sum x 2 Last First 2wA SIMPSON'S RULE The area is divided into an even number of strips. The ordinates are h1, h2 .. The area is calculated on the assumption that the curve joining neighbouring ordinates are a quadratic that passes through the mid ordinate. It follows that if the curve is a parabola, the area will be exact. The derivation is not given here as it is quite complicated but the result is as follows. ordinates odd remaining theof sum2ordinateseven theof sum4last first 3 wI 5 WORKED EXAMPLE Find the area under the graph of the function y = sin between the limits 0 and radians using INTEGRATION and the trapezoidal rule.
6 SOLUTION Evaluating the ordinates and mid-ordinates at intervals of /8 produces the table and graph shown. Figure 5 INTEGRATION 211 0 cos coscos -d sin A 0 0 Mid-ordinates w = /4 ) ( )hhhw(hA4321 Trapezoidal Rule w = /4 units /4 Arest theof sum x 2 Last First 2wA Note one answer is slightly large and the other slightly small. 6 WORKED EXAMPLE Find the area under the curve f(x) = 2x2 + 4x + 8 between x = 0 and x = 4 using Simpson's Rule with eight strips and determine the error. SOLUTION 4028)dx4x(2xA 0)4(8)4(23)4(28232A234023 xxx SIMPSON'S RULE ordinates odd remaining theof sum2ordinateseven theof sum4last first 3wI The error is zero and it always is when the function is a quadratic.
7 It follows that for a quadratic you only need two strips. SELF ASSESSMENT EXERCISE 1. Find the area under the graph of the following functions using INTEGRATION , the mid-ordinate rule and the trapezoidal rule. y = 2x3 between the limits x = 0 and x = 5 y = ex between the limits of x = 1 and x = 5. y = sin x between the limits x = 0 and x = 180o. 2. Estimate the value of the definite integral 514dxxI by Simpson's rule using four strips. What is the error in the estimate? ( and too large) 7 In ENGINEERING the area under the graph represents real things. For example the area under a force distance graph represents the work done or energy used and the area under a pressure volume graph also represents work done during the compression or expansion of a gas.
8 WORKED EXAMPLE The pressure (p) and volume (V) during a gas expansion is related by the law p = Determine the work done when the volume is expanded from 10 x 10-6 m3 to 100 x 10-6 m3. Use calculus and the trapezoidal rule to find the answer. SOLUTION Figure 7 INTEGRATION Joules x p dV Work TRAPEZOIDAL RULE w = 10 x 10-6 m3 Joules ( x x 5 x 210 x x 2210 x 10 Wrest theof sum x 2 Last First 2wW436-4456- 8 SELF ASSESSMENT EXERCISE 1. The electric current charging a capacitor is related to time by the following law. I = 10(1 e-t/2) Amps Calculate the charge Q (the area under the graph) between the limits t = 0 and t = 6 s. Use calculus and the trapezoidal rule.)
9 (Graph and ordinates are calculated for you) (Answer around 41 Coulombs) Figure 8 2. Find the area (with units) under the following function between the limits x = 0 and x = 10 m using INTEGRATION , the mid-ordinate rule and the trapezoidal rule. y = 4 + 20x x2 m (Answers around m2) 3. Find the area under the following function between the limits t = 0 and t = 1 s using INTEGRATION , the mid-ordinate rule and the trapezoidal rule with steps of v = 2t + e2t m/s (Answers around m) 4. Find the area (with units) under the following function between the limits = 0 and = radian using INTEGRATION , the mid-ordinate rule and the trapezoidal rule with steps of radian T = 3 cos (Nm) (Answers around Joules) 5.
10 Find the area (with units) under the following function between the limits V = 1 and V = 5 m3 using INTEGRATION , the mid-ordinate rule and the trapezoidal rule with steps of 1. p = 2 ln V N/m2 (Answers around Nm or Joules)