Integrals 215 problem 09.mws

In this exercise, we study how to approximate a curve by polygons, that is, we replace the curve with line segments joining some points on the curve. Since we know how to find the length of a line segment exactly, we can approximate the length of the curve by the lengths of the approximating polygonal curves.

Let us study the arclength of the function given by , over the domain given by .

> f:=x->x*(4-x)^(1/3);

To plot a sequence of line segments between points in Maple, we first define the sequence of points. Suppose we want to divide the interval [ ] into n segments. The points are given by a sequence of the form ( ), where . These divisions are the same as we used for Riemann sums. Then the sequence command can be used to list the points as follows.

> points:=proc(n)

> seq([(a+i*(b-a)/n),(f(a+i*(b-a)/n))],i=0..n);

> end;

To use this command to list points, you need to define the function f and the endpoints a and b . For example, to make 4 line segments we proceed as follows.

> a:=0;b:=4;

> points(4);

We can plot the line segments connecting these points as follows.

> plot([points(4)],linestyle=3,color=red);

Let us plot both the curve and the line segments on the same graph in order to see what the picture looks like. We need the package plots to use the display command for multiple plots on the same axes.

> with(plots):

> plot1:=plot(f(x),x=0..4,color=blue):

> plot2:=plot([points(4)],linestyle=3,color=red):

> display(plot1,plot2);

To compute the sum of the lengths of the line segments connecting these points, note that the length of the line segment between the points ( ) and ( ) is simply . Thus all we have to do is sum all these lengths up. We can do this easily in Maple as follows.

> n:=4;

> evalf(sum(sqrt(((b-a)/n)^2+(f(a+i*(b-a)/n)-f(a+(i-1)*(b-a)/n))^2),i=1..n));

This gives us an approximate value of the arclength of the curve. Let us compare this approximate value with Maple's evaluation of the exact arclength of the curve. To compute the exact arclength, we compute the following integral.

> int(sqrt(1+D(f)(x)^2),x=a..b);

Here Maple does not evaluate the integral, because it does not know how to do this exactly. But Maple can give us a floating point estimate for the value of the integral.

> evalf(int(sqrt(1+D(f)(x)^2),x=a..b));

This value is not too far from our estimate using only four intervals. Let us try the same using 100 intervals.

> n:=100;evalf(sum(sqrt(((b-a)/n)^2+(f(a+i*(b-a)/n)-f(a+(i-1)*(b-a)/n))^2),i=1..n));

This time the estimate is much closer. Ideally, we would like to have error bounds for our estimates, as we did for the Trapezoid Rule and Simpson's Rule.

Submission:

Let on the interval .

1) Divide the interval into 4 pieces and plot the curve and the polygonal path that approximates the curve on the same plot.

2) Find a floating point approximation of the integral that computes the exact length of the curve.

3) Estimate the length of the curve using the division into 4 line segments in part 1.

4) Find an n so that if the interval is divided into n pieces, the error in summing the lenths of the polygonal approximation is less than 0.001.

Submission worksheet:

>

Suppose that we are given a curve defined by , over the interval given by . We could compute the arclength by solving for y as a function of x , but we can avoid doing this and save some time and effort. Recall that the integrand for arclength is sometimes written as . In our example above, if we differentiate implicitly, we obtain , so that

=

In order to justify the last step, we need to know the values that y takes on as x goes from 0 to . But and , so the corresponding interval for y is . On this interval, is always positive, so that .

We can compute the arclength of this curve as simply

> int(sec(y),y=0..Pi/3);

Note that this is one of those rare curves where Maple can compute the integral representing an arc length exactly. Actually, so can you, because the indefinite integral of the secant function can be computed by the following trick

.

Even if Maple could not compute the integral exactly, we could always obtain a floating point estimate for the integral in the form below.

> evalf(int(sec(y),y=0..Pi/3));

Let us plot the curve and see if the answer looks at all reasonable. Because x is given as a function of y , if we wish to plot the curve with the axes in the usual positions, we will need to use the implicitplot command. This means that we shall have to load the package plots , if we have not already done so.

> with(plots):

> implicitplot(x=ln(sec(y)),x=0..ln(2),y=0..Pi/3);

Submission:

For the curve given by , , do the following.

1) Set up an integral that represents the arc length.

2) Compute this arc length exactly in Maple.

3) Plot the function. Use scaling=constrained.

4) Explain why the graph leads to an explanation of the answer you obtained in 2).

Submission worksheet:

>

Recall that if a curve is given parametrically in terms of the parameter t , in the form and , where , then the parametric formula for the length L of the curve is

.

For example, suppose that and , for . Then we can compute this integral easily as follows.

> x:=t->cos(t);y:=t->t+sin(t);

> int(sqrt(D(x)(t)^2+D(y)(t)^2),t = 0..Pi);

Let us plot this curve parametrically as well. The form for a parametric plot of a single curve is as follows.

> plot([cos(t),t+sin(t),t=0..Pi]);

Let us try to solve for y as a function of x . Note that = , so that , and thus we have . Since , we can express . Let us check this formula by plotting, and comparing to our parametric plot.

> plot(arccos(x)+sqrt(1-x^2),x=-1..1);

Using the expression for y as a function of x , we could compute the arclength directly. Note that , so our integral can be computed as follows:

> f:=x->arccos(x)+sqrt(1-x^2);

> int(sqrt(1+D(f)(x)^2),x=-1..1);

Thus we could either solve for one of the variables as a function of the other, and then use the standard methods of computing arc length, or we can use the parametric formula to compute the length of the curve directly. However, in many cases, it might be impossible to solve for one variable in terms of the other, so that the parametric form for arc length is the only method available to us.

Submission:

Suppose that a curve is given by the parametric equations , , .

1) Compute the length of this curve using the parametric formula for arc length.

2) Plot this curve parametrically.

Submission worksheet:

>

Consider the curve given by the equation . on .

Submission worksheet:

1) The right hand side of the equation is an expression which determines y as a function of x . Find the derivative of

this function. ( Hint : Use the fundamental theorem of calculus, not Maple, to solve it.)

2) Plot the curve in Maple.

3) Find the length of the curve.

Submission worksheet:

>

>

>