Arc Length Dr. Diana Wells, University of North Dakota Objectives of Assignment 1. 2. I. To approximate the length of a curve. To find the length of a curve using integration. Introduction The graph of a continuous function, f(x), from some x = a to x = b, is a curve or arc which has a length associated with it. For example, the graph of f(x) = 2x – 3 from x = 1 to x = 2 is a line segment connecting the points P1 =(1, –1) and P2 =(2, 1). The length is given by: P1 P2 = (1 − 2) 2 + ( −1 − 1) 2 = 1 + 4 = 5 . II. Approximating the Length of a Curve If f(x) = 3 sin(x/2) + 5, the graph of the function from x = 0 to x = 2π is not a straight line. However, we can approximate its length in the following way. (1) Divide the interval [0, 2π] into 4 equal partitions. (2) Connect the “dots”. That is, draw the line segments from (0, f(0)) to (π/2, f(π/2)), from (π/2, f(π/2)) to (π, f(π)), from (π, f(π)) to (3π/2, f(3π/2)), and from (3π/2, f(3π/2)) to (2π, f(2π)). (3) Find the length of each segment. (4) Add these four values for an approximation of the length of the curve. The result is: L ≈ 8.878878. 24 To obtain a better approximation, divide the interval [0, 2π] into 100 equal partitions. This yields: L ≈ 8.986532. This would be a much better partition, but very tedious to by hand calculations. III. An X(plore) Subroutine To Do The Work To approximate the length of a curve, we will use a subroutine which will (1) partition the interval from x = a to x = b into n parts using partition points P = {x 0, x 1, x 2, · · · , x n}. (2) Draw the line segment from Pi – 1 to Pi . (3) Calculate the length of each line segment Pi−1 Pi = ( xi − xi −1 ) 2 + ( f ( xi ) − f ( x i−1 )) 2 (4) Add the calculated length to a running total L = L + Pi−1 Pi ∑ n So the end result is an approximation of the length L ≈ Pi−1 Pi i=1 Procedure arclength(f(x), a, b, n) 1. procedure arclength(%f, a, b, n) 2. erase 3. color(red) 4. graphics 5. graph(f(x), x) 6. dx = (b – a)/n 7. xi = a 8. arcl = 0 9. for i = 1 to n step 1 10. line(xi, f(xi), xi+dx, f(xi+dx)) 11. arcl = arcl + sqrt((xi + dx - xi)^2 + (f(xi + dx) - f(xi))^2) 12. color((getcolor+1)mod15) 13. xi = xi + dx 14. end 15. text 16. write(‘approximate arclength is ’, arcl) 17. end 1. 2. 3. 4. 5. Explanations of procedures name of the subroutine - notice the order of a, b, and n clearing graphics screen setting initial color setting graphics graphs the function (notice that the window is not defined here) 25 . . 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. finding the width ∆x and calling it dx x-coordinate of left end of first line segment total sum of the lengths (which is 0 to start with) tells X(plore) to do this n times graphs present line (see manual or on-line help) adds length of this line segment to total length so far changes color of next line segment moves to left end of next line segment go back up to “for” and do it again takes X(plore) out of graphics auto reports total sum of length of all line segments end of subroutine. Try the previous example f(x) = 3 sin(x/2) + 5 with this subroutine. IV. How to Use Integration to Find Arc Length The length of each “small” line segment is Pi −1 Pi = (∆xi ) 2 + (∆ yi ) 2 where ∆x i = |x i-1 – x i| and ∆yi = |f(x i-1 ) – f(x i)|. Recall: Using the Mean Value Theorem we can find an x i* ∈ [x i-1 , x i] such that f ( xi ) − f ( xi −1 ) = f ′ ( xi* )( xi − xi −1 ) , or ∆yi = f ′( x*i )(∆xi ) . Thus, our formula for the length of the line segment becomes, Pi −1Pi = (∆ xi ) 2 + (∆yi ) 2 Pi−1 Pi = (∆xi ) 2 + [ f ′( x*i )]2 (∆ xi ) 2 Pi−1Pi = 1 + [ f ′( xi* )]2 ∆xi The approximation for arc length becomes, ∑ n L≈ i =1 ∑ n Pi −1 Pi = i =1 26 1 + [ f ′( xi* )] 2 ∆xi . If we let the length of the partitions become smaller and smaller, we have ∑ n L = lim P →0 1 + [ f ′ ( x i* )] 2 ∆x i , i =1 which is the integral, L= ∫ b 1 + [ f ′( xi* )]2 dx . a For the previous example, f(x) = 3 sin(x/2) + 5, TRY g(x) = sqrt(1 + dif(f(x), x )^2) integ(g(x), x = 0 to 2π) L= ∫ 2π 1 + [ f ′( x)]2 dx ≈ 8.986713L . 0 V. Examples 1. f ( x) = x 2 from x = 0 to x = 1. 2. f ( x) = x 2 − (ln x )18 from P0(1, 1,) to x = 3. 3. 4. f ( x) = x4 1 + 2 4 8x with 1 ≤ x ≤ 3. f ( x) = e x cos x for − π2 ≤ x ≤ π2 . For each of the above functions: (a) (b) Approximate the arclength of the curve with n = 4, n = 10, n = 100. Integrate ∫ b 1 + [ f ′ (x)]2 dx to find the length. a (c) How close are the approximations? 27