Processing math: 100%

Approximating Integrals: Learn It 1

  • Understand that while all differentiable functions can be derived in a straightforward formula, not all functions can be integrated into a simple antiderivative
  • Calculate bounds for the area calculations under curves when direct integration methods aren’t applicable
  • Explain how estimating the bounds of an integral affects the accuracy of the approximation

Approximating Integrals

At this point on our calculus journey, we have developed the tools to find the derivative function of any differentiable function. Take, for example, the following function.

f(x)=[ln(tan2(1x2+3x))cos1(3x2+5x122x+1)+10x3x2]esin(x3.2)

Finding the derivative of this function would take multiple pages using the Chain Rule, Quotient Rule, Product Rule, Sum Rule, and derivative formulas. By cutting some corners and letting Wolfram|Alpha find the derivative function for us, we see that it is:

Solution for the derivation of the given function above. The details of the final equation are not important, just that it is very long and extremely complex.
Example of a complex derivative involving logarithmic, trigonometric, and exponential functions

Don’t worry—we won’t be asked to do anything quite that crazy by hand. But the point is that for any differentiable function we are given, we can apply the tools in our calculus toolbelt to find the closed-form expression of its derivative function.

However, integration is not always straightforward. There are many functions which are integrable but have no antiderivative in terms of standard elementary functions we’ve seen so far.

Consider:

g(x)=12πe12x2

If we were asked to compute the definite integral 10g(x)dx, the graphical area of which is shown in the figure below, could we use the Fundamental Theorem of Calculus, Part 2?

Try this on your own for a moment. Can you find an antiderivative of g(x) in terms of elementary functions?

Graph of a function that is a curve, peak at y-axis 0.4 and shaded under the curve from x=0 to x=1, to the x-axis.
Graph of g(x)

If your conclusion is “no,” then you are correct. While the function looks simple, it does not have an antiderivative in terms of elementary functions.

In Calculus II, we will learn additional techniques to find antiderivatives and indefinite integrals, such as integration by parts and partial fraction decomposition. However, even these methods cannot help us with the function g(x).

Finding an antiderivative of g(x) requires introducing special functions that are themselves defined in terms of integrals. This makes the process too complicated to apply the Fundamental Theorem of Calculus, Part 2, directly. (If you’re curious, you can look up the error function erf(x).

So, what can we do to find 10g(x)dx if we cannot find an antiderivative of g(x) in terms of elementary functions? We approximate the definite integral!

Remember, earlier in this module, we learned about using Riemann Sums to approximate the area under a curve. This method may not give us an exact answer but can get us very close when we’ve exhausted other tools. There are also tricks in mathematics that make approximations extremely useful.

Let’s use a left-endpoint Riemann Sum to approximate 10g(x)dx where g(x) is defined as above. If we split the interval [0,1] into n subintervals of length 1n, then the left-endpoint Riemann sum is:

Ln=ni=1g(i1n)1n.

If we choose n=10, then our approximation would be:

1012πe12x2dxL10=10i=1[12πe12(i1/10)2110]0.349.

Graphically, this left-endpoint sum with 10 subintervals looks as follows.

Curved function on graph, peak at y=0.4, rectangles are highlighted every increment of 0.1 along the x-axis using the left y-value to approximate the area under the curve. Bound from x=0 to x=1.
Left Riemann sum approximation of area under a curve

If we tell someone, “We have an approximation for 10g(x)dx, and it is 0.349!” they might ask, “That’s great, but how close is your approximation to the true value? How large could your error be?” This is where the concept of bounds comes in handy.

Instead of just giving a single approximation, we can provide upper and lower bounds for the true value. This gives more information because it tells us an interval within which the true value lies. If we choose a value from this interval as our approximation, we can also determine the maximum possible error.

To find these bounds, we use the concepts of upper sums and lower sums.

An upper sum uses the maximum function value on each subinterval, giving a weak over-approximation of the true area. A lower sum uses the minimum function value on each subinterval, giving a weak under-approximation of the true area.

Therefore, we can state:

Lower SumTrue ValueUpper Sum.

In our example, g(x)=12πe12x2 is decreasing over the interval [0,1]. Therefore, left endpoints of subintervals give maximum function values, making left-endpoint Riemann sums upper sums. Right endpoints give minimum function values, making right-endpoint Riemann sums lower sums.

A right-endpoint Riemann Sum to approximate 10g(x)dx with n subintervals is:

Rn=ni=1g(in)1n

With n=10, our right-endpoint approximation is:

1012πe12x2dxR10=10i=1[12πe12(i/10)2110]0.333.

Graphically, this right-endpoint sum with 10 subintervals looks as follows.

Curved function on graph, peak at y=0.4, rectangles are highlighted every increment of 0.1 along the x-axis using the right y-value to approximate the area under the curve. Bound from x=0 to x=1.
Right Riemann sum approximation of area under a curve.

Now we have an upper sum L10 and a lower sum R10, meaning we can state:

R1010g(x)dxL10.

Therefore,

0.3331012πe12x2dx0.349.

Another way to express this is that the true value of 1012πe12x2dx must lie in the interval [0.333,0.349]. If we choose a value from that interval for our approximation, what is the maximum possible error from the true value?

Suppose we choose the midpoint of the interval [0.333,0.349], which is:

midpoint =0.333+0.3492=0.341.

Since the true value lies within [0.333,0.349], the maximum distance our approximation could be from 1012πe12x2dx is the distance from the midpoint to the endpoints of the interval. Let ε(x) be the maximum error that could be associated with the approximation x. Then,

ε(0.341)=0.3490.341=0.3410.333=0.008.

In words, our approximation 0.341 could be at most 0.008 away from the true value of from the true value of 1012πe12x2dx.

There is no specific reason we chose n=10 for the number of subintervals. As we choose larger and larger n, the interval for our approximation would become smaller, as would the maximum error. Computers can perform these calculations efficiently for very large n, often necessary when computing a definite integral for a function with no antiderivative in terms of elementary functions.

Consider the function f(x)=1x4. Can you find 01f(x)dx using the Fundamental Theorem of Calculus, Part 2? If not, provide an upper bound and a lower bound for the true value of the definite integral. If you were to choose a single value from that interval to use as an approximation, what is the maximum error that could be associated with that approximation?

definition