Application Center - Maplesoft

# Improper integrals

You can switch back to the summary page by clicking here.

L13a-improperIntegrals.mws

Calculus II

Lesson 13a: Improper Integrals

So far in our study of integration, we have considered where is a bounded function on the bounded interval . We now want to see what happens when either or the interval becomes unbounded. In either case, we have what is called an improper integral (the integrals we have seen so far are called proper integrals). As you will see, an improper integral is not defined directly in terms of partitions and sums, but is instead defined as a limit of proper integrals.

Type 1: Infinite Intervals

We start with the case where the interval of integration, [ ), is unbounded on the right. In this case
we define

,

provided the limit exists. If is a positive function, this limit may be interpreted as the total area under the graph of to the right of ; in general, it may be given all the same interpretations as a proper integral.

We can start by observing that
Maple is capable of evaluating many improper integrals, for example

> Int(1/(2*x - 5)^3, x=4..infinity) = int(1/(2*x - 5)^3, x=4..infinity);

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

> p1 := plot(f(x), x=3.5..8,thickness=2):
p2 := plottools[line]([4,0],[4,f(4)],color=blue,thickness=2):
plots[display](p1,p2);

This gives us very little insight, however, so let's evaluate this same integral step-by-step. First, we need to evaluate the integral from to a variable upper limit . If we were doing this by hand, we would find an anti-derivative for our function and apply the Fundamental Theorem of Calculus:

> ad := int(f(x), x);

> inttob := subs(x=b, ad) - subs(x=4, ad);

We can get the same result in Maple by asking it to find the integral from 4 to directly. (The answer appears in a different form, but we can check that it is the same.)

> int(f(x), x=4..b);

> simplify(inttob - int(f(x), x=4..b));

Having found the integral up to one way or another, we can now take the limit as :

> Int(1/(2*x - 5)^3, x=4..infinity) = limit(inttob, b=infinity);

in agreement with Maple's original answer.

If the interval is unbounded to the left, we proceed similarly, defining

.

> Int(exp(3*x), x=-infinity..2) = int(exp(3*x), x=-infinity..2);

> inttoa := int(exp(3*x), x=a..2);

> limit(inttoa, a=-infinity);

Finally, if the integral is unbounded at both ends, we choose a convenient point (usually is fine)and define

,

provided both integrals on the right-hand side exist. This condition is crucial. For example, consider the integral

> f := x->(1 + (1+x^2)*sin(x))/(1 + x^2);

> Int(f(x), x=-infinity..infinity);

> plot(f(x), x=-50..50, thickness=2);

The plot indicates an integral over the whole real line might not exist. If we were careless, we might try to evaluate this as

> finiteint := int((1 + (1+x^2)*sin(x))/(1+x^2),x = -a .. a);

> Int(f(x) ,x = -infinity..infinity) = limit(finiteint, a=infinity);

THIS IS WRONG! To compute the integral correctly, we must let the two endpoints go to +/- separately. Choosing , the improper integral up to is computed as

> inttob := int(f(x), x=0..b);

> Int(f(x), x=0..infinity) = limit(inttob, b=infinity);

The strange form of the answer shows that something has gone wrong. Indeed, you should be able to see that the expression inttob doesn't have a limit as . There is no need to go further: one of the semi-infinite improper integrals does not exist, and so does not exist.

Question 1

Find the following improper integrals, or show that they do not exist. (Don't just ask Maple to evaluate them in one step: compute them as limits of proper integrals.)

> Int((2*x + 1)/(x^4 + 1), x=0..infinity);

> inttob := int((2*x + 1)/(x^4 + 1), x=0..b);

> limit(inttob, b=infinity);

> Int(1/(x*ln(x)), x=2..infinity);

> inttob := int(1/(x*ln(x)), x=2..b);

> limit(inttob, b=infinity);

(So this improper integral does not exist.)

> Int((2*x + 1)/(x^4 + 1), x=-infinity..infinity);

> part1 := int((2*x + 1)/(x^4 + 1), x=-a..0);

> limit1 := limit(part1, a=infinity);

> part2 := int((2*x + 1)/(x^4 + 1), x=0..b);

> limit2 := limit(part2, b=infinity);

Since both pieces of the improper integral separately have limits, we can add them together to get the final answer.

> Int((2*x + 1)/(x^4 + 1), x=-infinity..infinity) = limit1 + limit2;

>

> Int(sin(x)/(x^2 + 1), x=-infinity..infinity);

> part1 := int(sin(x)/(x^2 + 1), x=-a..0);

> limit1 := limit(part1, a=infinity);

> part2 := int(sin(x)/(x^2 + 1), x=0..b);

> limit2 := limit(part2, b=infinity);

The limits involve some unfamiliar functions, but they do (both) exist, and so we can add them together.

> Int(sin(x)/(x^2 + 1), x=-infinity..infinity) = limit1 + limit2;

The final answer is less surprising if you realise that the function being integrated is odd, and the limits on the integral are symmetric about 0.

> Int(x*sin(x)/(x^2 + 1), x=-infinity..infinity);

> part1 := int(x*sin(x)/(x^2 + 1), x=-a..0);

> limit1 := limit(part1, a=infinity);

> part2 := int(x*sin(x)/(x^2 + 1), x=0..b);

> limit2 := limit(part2, b=infinity);

> Int(x*sin(x)/(x^2 + 1), x=-infinity..infinity) = limit1 + limit2;

> Int(2*x/(x^2 + 5), x=-infinity..infinity);

> part1 := int(2*x/(x^2 + 5), x=-a..0);

> limit1 := limit(part1, a=infinity);

Since one of the two parts of the improper integral doesn't exist, we can stop: does not exist.

>

Type 2: Unbounded Functions

The second type of improper integral is that in which the function is unbounded on the interval . A common example of this is when the function becomes unbounded at one or other endpoint of the interval, and we will look at this case. (As explained in class, other cases can be reduced to this one anyway.) Suppose first that, for every small , is integrable on every interval ( ] . Then the improper integral is defined as

.

Here is an example. We can start by seeing that Maple can evaluate this type of improper integral as well.

> Int(1/sqrt(x), x=0..2) = int(1/sqrt(x), x=0..2);

To check this, we evaluate the integral from to 2 and let approach 0 from the right. (Note the use of the argument right in the limit command.)

> ad := int(1/sqrt(x), x);

> properint := subs(x=2, ad) - subs(x=epsilon, ad);

> Int(1/sqrt(x), x=0..2) = limit(properint, epsilon=0,right);

By the way, notice that the two-sided limit does not exist but, at least in this case, Maple doesn't tell us so:

> limit(properint, epsilon=0);

In case
becomes unbounded at the right-hand endpoint, we define

.

> Int(1/(x-2)^2, x=0..2) = int(1/(x-2)^2, x=0..2);

Maple's answer suggests that this improper integral doesn't exist. Let's check this:

> ad := int(1/(x-2)^2, x);

> properint := subs(x=2-epsilon, ad) - subs(x=0, ad);

You can see that the limit as doesn't exist. So can Maple:

> limit(properint, epsilon=0, right);

Finally, if
is unbounded at both endpoints, we split the interval at some convenient point , and define

,

provided both improper integrals on the right-hand side exist.

Question 2

Evaluate the following improper integrals, or show that they do not exist.

> Int(1/sqrt(1-x), x=0..1);

> inttoe := int(1/sqrt(1-x), x=0..1-epsilon);

> Int(1/sqrt(1-x), x=0..1) = limit(inttoe, epsilon=0, right);

> Int(1/sqrt(4-x^2), x=0..2);

> inttoe := int(1/sqrt(4-x^2), x=0..2-epsilon);

> Int(1/sqrt(4-x^2), x=0..2) = limit(inttoe, epsilon=0, right);

>

> Int(1/(x^2 - 1), x=1..2);

> inttoe := int(1/(x^2 - 1), x=1+epsilon..2);

> limit(inttoe, epsilon=0, right);

This improper integral does not exist.

> Int(exp(sqrt(x))/sqrt(x), x=0..1);

> inttoe := int(exp(sqrt(x))/sqrt(x), x=epsilon..1);

> Int(exp(sqrt(x))/sqrt(x), x=0..1) = limit(inttoe, epsilon=0, right);

> Int(1/(x^2 - 5*x + 6), x=1..4);

Note that the denominator of this function is 0 at two places: and , so we have to split the integral into (at least) 3 parts, evaluate them separately, and add them together. First we deal with the integral from 1 to 2, which is improper at 2.

> inttoe := int(1/(x^2 - 5*x + 6), x=1..2-epsilon);

> part1 := limit(inttoe, epsilon=0, right);

We can stop: the first part of the integral does not exist, so the complete integral cannot either.