Advice: Errors in symbolic integration

As most calculus students know, integration can be a difficult process. Even in Maple, the difficulties have not all been overcome, and symbolic integration should not be considered as completely reliable in all cases. In general it is prudent to check the correctness of integrals, either by comparing definite integrals to their floating-point approximations or by comparing the derivative of an indefinite integral to the integrand.

One common source of trouble is multivalued functions. In particular, a definite integral int(f(x), x = a .. b) may give a wrong answer because the antiderivative is a multivalued function [Maple Math] with a branch cut crossing the path of integration. Maple does not recognize the branch cut, and returns [Maple Math] as the value of the definite integral. Note that this can happen even when the integrand [Maple Math] is single-valued.

In other cases, when [Maple Math] is multivalued Maple may find an antiderivative for the wrong choice of branch of [Maple Math] .

Examples:

The following examples are in Maple V Release 4 and 5. They may be corrected in later releases.

We begin with an antiderivative of [Maple Math] .

> F:= int(exp(I*x)/(1+x^2),x);

[Maple Math]

This is correct in the sense that differentiation gives us back the integrand (after simplification).

> simplify(diff(F,x));

[Maple Math]

> rationalize(%);

[Maple Math]

Here is a definite integral with this integrand.

> evalf(int(exp(I*x)/(1+x^2), x=-2 .. 2));

[Maple Math]

This result was obtained by evaluating the antiderivative at the endpoints of the interval.

> evalf(subs(x=2,F) - subs(x=-2,F));

[Maple Math]

However, the answer is wrong. Here is the correct value, obtained by numerical integration.

> evalf(Int(exp(I*x)/(1+x^2), x=-2 .. 2));

[Maple Math]

> error:= % - %%;

[Maple Math]

The cause of the error is a discontinuity of the antiderivative at [Maple Math] . It has a jump of size equal to the error.

> evalf(Limit(F,x=0,left)-Limit(F,x=0,right));

[Maple Math]

The function [Maple Math] which occurs in the antiderivative has a branch cut along the negative real axis. Thus at [Maple Math] , [Maple Math] hits the branch cut and the term [Maple Math] in the antiderivative takes a jump.

The next example features a problem with branches of a fractional power.

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

[Maple Math]

> F:= int(f,x);

[Maple Math]

> simplify(diff(F,x));

[Maple Math]

This is the same as [Maple Math] for positive [Maple Math] , but not for negative [Maple Math] (with the principal branch of the fifth root, which Maple uses).

> evalf(subs(x=-1,diff(F,x)));

[Maple Math]

> evalf(subs(x=-1,f));

[Maple Math]

See also: int , Integrals involving fractional powers , Numerical integration

Maple Advisor Database R. Israel, 1998