Mathematics 161                                  Laboratory 12                           November 19, 1992
	  
Name: _____________________________   Lab Partner: ___________________________
	  
Consulted with:  ____________________________________________________________

© Lafayette College, 1994

Integrals, Areas and Average Temperatures

In this laboratory, you will use Mathematica to compute indefinite & definite integrals.  You will also practice interpreting definite integrals as areas of regions in the plane.

Part 1:  Antiderivatives

Mathematica's Integrate command can be used to find antiderivatives of many continuous functions.  To compute an antiderivative in the indefinite integral

use the command

Integrate[f[x], x]

For instance, we all know the indefinite integral

When we ask Mathematica to evaluate this:

Integrate[x^2, x]

we don't get the right answer (well, not ALL the right answer).  What is missing?

Mathematica can even evaulate some integrals that you might find very difficult.  For instance

Integrate[ Sin[1 + Sqrt[x]], x]

applies techniques we will discuss in Calculus II.  To check that the answer supplied is an antiderivative of the original function, take its derivative:

D[%,x]

Some functions have antiderivatives that seem surprising, such as

Integrate[1/Sqrt[1 - x^2], x]

If you don't believe that the derivative of arcsinx could make no mention of any sort of trig function (or even if you do), check it for yourself; take its derivative:

D[ArcSin[x], x]

Finally, notice that some relatively simple functions have no simple expression for their antiderivative.  For instance,

Integrate[Sin[1 + Cos[x]], x]

Part 2:	Definite Integrals and Area

To evaluate the definite integral

use the command

Integrate[f[x], {x, a, b}]

Use Integrate to compute the exact value of the definite integral of the function f(x) = 2x + 3 over the interval (–3, 4).  Check your answer by interpreting the integral as the area of a region whose area you can compute by other means.  Make an appropriate plot (either by hand or by computer) and shade the region whose area you have computed.

Use Integrate to compute the exact value of the definite integral of the function below over the interval (0, 2).

Explain how you can use the area interpretation of the definite integral to verify your answer.  (Include a sketch.)

Determine the area of the region in the first quadrant which is bounded by y = x – sinx below, and y = sinx above.  Briefly explain how you determined the area of this region.  (Use complete sentences.)

Part 3:	Average Temperature

On a typical day this time of year, the temperature (in degrees Fahrenheit) might be given by the function

temp[t_] := 29.6 + 2.9 t - 0.1 t^2 - 8 Cos[0.26 t]

(Here, the time, t, is in hours with t = 0 representing the beginning of the day and t = 24 representing the end of the day.)

To get a feeling for how the temperature fluctuated over the course of the day, plot the graph of temp.

Plot[temp[t], {t, 0, 24}, PlotRange->{0,60}];

Print a copy of this plot for use in Part 4.  One way to give an "average temperature" for the day would be to average the high and low temperatures which were recorded.  This is the method most television reporters seem to use to calculate the average temperature.  Using your plot, estimate the highest and lowest temperatures of the day and compute this rough average of the temperature.  (You don't need much accuracy here; just eyeball it.)

	           High __________          Low __________            Average __________

We could get a more meaningful average temperature by taking several readings over the course of the day and averaging those readings.  For example, we might read the temperature each hour, sum those 24 readings, and divide by 24 to obtain such an average.  Use the command

Sum[temp[n], {n, 1, 24}]/24

to compute this average.

                   The 24-readings average temperature is __________ .

We could do even better, by using more temperature readings in our average.  Modify the command above to compute an average temperature based on readings taken 48 times a day (every half-hour).

                   The 48-readings average temperature is __________ .

define a function avetemp to compute an average temperature based on taking n readings a day.  Use your command to compute an average temperature which is still more meaningful than the 48-readings average.

How often did you take readings for your average? __________ .

                  The __ -readings average temperature is __________ .

Part 4: 	Does This Involve Integrals?

Use a definite integral to compute the area of the region bounded by the graph of temp[t] and the t-axis for 0 ≤ t ≤ 24.

                                       The area of the region is __________ .

Suppose you want to build a rectangle with a base 24 units long and an area equal to the area you just computed.  What height must that rectangle have?

	The height of the rectangle must be __________ units.

Draw your rectangle on the plot you printed in Part 3 and shade the region inside the rectangle.  How does the height of your rectangle compare with the average temperatures you computed in Part 3?  Explain briefly why this makes sense.

Based on your observations about integrals, areas and averages, propose a definition for the average value of a function f(x) on an interval (a,b).  Give your answer in a complete sentence.