\begin{matrix}c \\ ◯ \end{matrix}Copyright 1995, 1998 P. Yasskin, S. Fulling, E. Letzter

Spring 1998

Maple Lab, Week 28

A Flask of Blood

Objective: This lab will improve your understanding of the ϵ–δ definition of a limit.

Review of Maple’s equation-solving commands: Suppose you want to solve the equation \frac{x}{π} + sin x = 1. You first enter the equation to make sure you have typed it properly:

>eq := x/Pi + sin(x) = 1;

You can then plot the left and right hand sides of the equation to see approximately where they intersect:

>plot({ lhs(eq), rhs(eq) }, x=-2*Pi..4*Pi);

You observe that there are three intersection points (solutions), one between 0 and 2, one between 2 and 4, and one between 4 and 6. To find the solutions more precisely, you might first try Maple’s solve command:

>solve(eq, x);

Well, it seems (in Release 4) that Maple can’t solve the equation exactly. So, use Maple’s fsolve command to find approximate (numerical) solutions:

>fsolve(eq, x);

This gives only the solution between 2 and 4. (You can recognize it as π — an exact solution that solve did produce in Release 3!) After fsolve finds one solution, it stops. To find others, you need to add a range to the fsolve command to lead it to the solution you want:

>fsolve(eq, x=0..2);   fsolve(eq, x=4..6);

Now you have all three solutions.

Exercises:

1. The flask of blood

You are working in a medical lab where they measure the volume of blood in a conical flask by accurately measuring the height of the liquid. A particular flask is 5 cm in radius and 20 cm high. You can see a picture of it by executing the following Maple plot:

>plot3d([r*cos(theta), r*sin(theta), 4*r], r=0..5, theta=0..2*Pi,
    scaling=constrained, axes=normal, orientation=[30,75]);

The volume of a cone is given by

>V := 1/3 *Pi*r^2*h;

(Execute these commands as you read along.) For this cone, if the blood fills up to a height h, then the radius of the surface of the blood is

>r := h/4;

So the volume is:

>V;

Plot the volume as a function of the height.

Your medical supervisor says that the volume of the blood needs to be V_{0} = 40 cm^{3}. She asks you to find the height h_{0} of the blood in the flask. So execute

>V0 := 40;

and solve the equation V = V_{0} . Save the relevant root as h0.

Your supervisor now says that the volume of blood needs to be accurate to ±1 cm^{3}. Let this “output accuracy” or “tolerance” be called ϵ:

>epsilon := 1;

Then she asks you how accurately the height of the blood needs to be measured. This “input accuracy” is called δ. You need to find δ so that if the height h is in the interval (h_{0} − δ, h_{0} + δ) then the volume V will be in the interval (V_{0} − ϵ, V_{0} + ϵ). Let’s approach this problem graphically before getting into algebra. First execute

>Vp := V0+epsilon;   Vm := V0-epsilon;

Add the horizontal lines at V_{p} and V_{m} to your plot of V. Then click with the mouse to find the values h_{p} and h_{m} where V = V_{p} and V = V_{m} respectively. (You can improve your results by restricting the domain in the plot to h=8..9 or even further.)

In your plot (with h restricted to [8, 9]) you can see that V is contained in the interval (V_{m}, V_{p}) exactly when h is contained in the interval (h_{m}, h_{p}). (Note: This would not necessarily be so if the function V (h) were not a monotonic (either increasing or decreasing) function.) Now recall that we are seeking the largest value of δ such that V (h) is in (V_{m}, V_{p}) when h is contained in (h_{0} − δ, h_{0} + δ). Therefore, we are trying to find the largest value of δ such that the interval (h_{0} − δ, h_{0} + δ) is contained in the interval (h_{m}, h_{p}). Since h_{p} and h_{m} do not have to be equidistant from h_{0} , δ must be the smaller of δ_{p} = h_{p} − h_{0} and δ_{m} = h_{0} − h_{m}.

To get an accurate value of δ, use fsolve to solve the equations V = V_{p} and V = V_{m} (saving the results as hp and hm), then use Maple to compute δ_{p}, δ_{m}, and δ = min(δ_{p}, δ_{m}). (Maple has a min function that can be used here.)

Your supervisor now decides that the blood must be accurate to within ±0.05 cm^{3}. Repeat your calculations for this case. (You don’t need to retype everything. Just change epsilon and reexecute the commands from that point on.)

The fact that you can compute a satisfactory δ for any ϵ is summarized in the statement that

lim_{h→h_{0}} V (h) = V_{0} .

This limit means:

For every ϵ > 0 there is a δ > 0 such that

if the height h is in the interval (h_{0} − δ, h_{0} + δ) (with h ≠ h_{0}) then the volume V will be in the interval (V_{0} − ϵ, V_{0} + ϵ).

2. The famous trig limit

Consider the function f(x) = \frac{sin x}{x} .

>f := x -> sin(x)/x;

The function is undefined at x = 0. Maple agrees:

>f(0);

However, the function does have a limit as x approaches 0. To see this, plot the function

>plot(f);

and use it to guess whether lim_{x→0} \frac{sin x}{x} exists and, if so, what its numerical value is. Note: As far as Maple and graphics are concerned, your guess is truly a guess. When Maple plotted the function, it simply plotted some points and connected the dots. (To see these dots, click in the plot window menu on Style and Point.) So there is no guarantee that between 0 and the closest dot the function won’t become much larger or much smaller. Of course, you know that for this well-known function that doesn’t happen; but a computergenerated graph is not a proof of that.

Check that Maple agrees with your limit by executing

>Limit(f(x), x=0);   value(");

This limit means:

For every ϵ > 0 there is a δ > 0 such that if x is in the interval (−δ, δ) (with x ≠ 0) then \frac{sin x}{x} is guaranteed to be in the interval (1 − ϵ, 1 + ϵ).

Given that ϵ = 0.2, find the largest δ such that if 0 < |x| < δ then |\frac{sin x}{x} − 1| < ϵ. Again you can do this roughly by adding horizontal lines to your plot and using the mouse to identify the points x_{p} and x_{m} where f(x) leaves the interval (1−ϵ, 1+ϵ). Then use fsolve to identify δ more accurately. (Comment on how this situation is different from the case of the flask.)