Spring 1998

Maple Lab, Week 21

Far-Out Integrals I

Based on suggestions by M. L. Platt, CASE Newsletter #28, April 1997

References: Integration by parts: Stewart Sec. 7.1; CalcLabs Sec. 9.2 Numerical integration: Stewart Sec. 7.8; CalcLabs Secs. 7.3, 15.7 Limits at Infinity: Stewart Sec. 3.5

Background: This lab demonstrates the usefulness of integration by parts to improve the results of a numerical integration. It also introduces integration over an infinite interval, which we will study in more depth later (see Stewart Sec. 7.9). Such integrals are defined by limit formulas of the sort

∫_{0}^{∞} f(x) dx = lim_{L→∞} ∫_{0}^{L} f(x) dx.

Exercises: 1. Consider I_{exp}(L) = ∫_{0}^{L} x^{2}e^{−x} dx.

(A) Analytically (by hand) evaluate I_{exp}(L) for L = 10, 100, 1000, and ∞. Use Maple to get the numerical values of your results.

(B) Use Simpson’s rule with n = 100 to evaluate I_{exp}(L) for L = 10, 100, and 1000. (Remember the simpson command in the student package.) Compare with your exact results. Use the error formula for Simpson’s rule (Stewart p. 484) to estimate how many decimal places of accuracy you should have expected; compare with what actually happened; explain.

(C) Could you have safely predicted the value of I_{exp}(∞) from your Simpson results?

2. Consider I_{sin}(L) = ∫_{π}^{L} \frac{sin x}{x} dx. (This integral can’t be evaluated analytically.)

(A) Use Simpson’s rule with n = 100 to evaluate I_{sin}(L) for L = 10, 100, and 1000. Use the error formula for Simpson’s rule to estimate how many decimal places of accuracy you should expect. Estimate how the accuracy would improve if you took n = 10, 000.

(B) Discuss the feasibility of calculating a table of values of I_{sin}(L) for L = 1000, 2000, …, 10000, accurate to 4 decimal places. Discuss the feasibility of determining I_{sin}(∞) by calculating I_{sin}(L) for very large L (using appropriately large values of n).

3. THE MAIN POINT: Integrate I_{sin}(L) by parts (with u = 1/x, dv = sin x dx) to get a new integral, I_{cos}(L), that is more amenable to numerical integration at large L. Can you approximate I_{cos}(∞) to 4 decimal places by I_{cos}(L) for some L that is small enough that the integral can be feasibly found with Simpson’s rule? If necessary, integrate by parts again!

Hint: |∫_{L}^{∞} \frac{cos x}{x^{n}} dx| < ∫_{L}^{∞} \frac{1}{x^{n}} dx (and similarly for sin).

4 (extra credit). Find ∫_{0}^{∞} \frac{sin x}{x} dx as accurately as you can. (You may need to take special action to tell Maple that the value of the integrand at 0 is equal to 0.)

Save all your files, calculations, and output for possible use in the sequel to this lab, which will occur late in the semester.