Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Techniques of integration

Every definite integral is now a search for an antiderivative, and unlike differentiation, that search has no algorithm that always terminates.

The asymmetry is worth stating plainly at the start. Differentiating is mechanical: identify the outermost structure, apply the matching rule, recurse, and an answer always appears. Antidifferentiating is pattern recognition, assisted by a handful of transformations that convert an unfamiliar integrand into a familiar one. This lesson covers the transformations that do most of the work, and then says exactly where they stop, because a course that implies every integral can be done teaches a falsehood that the first real problem will expose.

Substitution

The chain rule says ddxF(u(x))=F(u(x))u(x). Read backwards, that is an integration rule: an integrand of the shape f(u(x))u(x) has antiderivative F(u(x)), where F is an antiderivative of f. In practice it is easier to run with the substitution written out:

f(u(x))u(x)dx=f(u)du

The mechanics are to choose u, compute du=u(x)dx, and check that everything left in the integrand can be written in terms of u. If something cannot, the substitution is the wrong one, and this is a genuine search rather than a procedure.

For a definite integral there are two options: convert back to x at the end, or, better, convert the limits when you convert the variable. The second is less error-prone and avoids re-expressing a possibly ugly antiderivative.

Example. Evaluate 02xex2dx.

The awkward part is ex2, and the rest of the integrand is xdx, which is nearly the derivative of the exponent. Take u=x2, so du=2xdx and xdx=12du. The limits convert too: x=0 gives u=0, and x=2 gives u=4. The integral becomes

1204eudu=12(e4-1)=26.799

The substitution worked because the derivative of the inside function was already sitting in the integrand, up to a constant. That is the pattern to look for.

Now you. Evaluate 0π/2sin3xcosxdx.

Answer

Take u=sinx, so du=cosxdx, and the limits become 0 and 1. The integral is 01u3du=1/4.

Substitution also runs in the less obvious direction, replacing x by a function of a new variable to exploit an identity. Putting x=sinθ into 1-x2dx turns the root into cosθ by the Pythagorean identity, and the integral becomes a trigonometric one. This is how the area of a circle is computed by calculus rather than assumed.

Integration by parts

The product rule, (uv)=uv+uv, rearranges into uv=(uv)-uv. Integrating both sides and using the Fundamental Theorem on the exact derivative gives

udv=uv-vdu

which is integration by parts. It does not evaluate an integral; it trades one integral for another, and the skill is choosing the split so that the trade is favourable.

The guidance is to let u be the factor that gets simpler when differentiated, and dv the factor you can integrate. A power of x becomes a lower power, and eventually a constant; a logarithm or an inverse trigonometric function becomes an algebraic fraction, which is a large improvement; a sine or an exponential stays the same size, so it usually belongs in dv.

Example. Evaluate 0πxsinxdx.

Take u=x and dv=sinxdx, so du=dx and v=-cosx. The formula gives

0πxsinxdx=[-xcosx]0π+0πcosxdx

The bracket is -πcosπ-0=π, and the remaining integral is [sinx]0π=0. So the answer is π=3.14159. Had the split been made the other way, with u=sinx, the new integral would have contained x2, which is worse than what we started with: the wrong choice tells you so immediately.

Now you. Evaluate 1elnxdx.

Answer

There is only one factor, so take u=lnx and dv=dx, giving du=dx/x and v=x. Then the integral is [xlnx]1e-1edx=(e-0)-(e-1)=1. This is the standard trick for integrating a function whose derivative is nicer than itself.

Sometimes parts is applied twice and the original integral reappears, at which point it can be solved for algebraically. That is how exsinxdx is done: two applications return -exsinxdx plus explicit terms, so moving it to the left side and dividing by two finishes the job.

Rational functions, always

For a quotient of polynomials there is a genuine algorithm, which is unusual enough to be worth stating. Any rational function can be decomposed into a polynomial plus a sum of terms of the form A/(x-r)k and terms with irreducible quadratic denominators, and every one of those pieces integrates to a logarithm, a power, or an arctangent. So every rational function has an elementary antiderivative.

Take 23dxx2-1. Factor the denominator as (x-1)(x+1) and write

1x2-1=12(1x-1-1x+1)

which is checked by recombining over the common denominator. Each piece is now a logarithm, so the integral is 12[ln|x-1|-ln|x+1|] evaluated from 2 to 3, which is 12[ln(2/4)-ln(1/3)]=12ln(3/2)=0.202733.

The same partial fraction decomposition is used constantly outside integration, in solving differential equations and in inverting transforms, so the algebra is worth having regardless.

Averages of squares, and why mains voltage is 230

Trigonometric integrands are handled with identities rather than ingenuity, and one case is worth doing because its answer is on the back of every appliance.

To integrate sin2x, use the identity sin2x=12(1-cos2x), which turns an impossible integrand into two easy ones: sin2xdx=x2-sin2x4+C. Over a full period from 0 to 2π the cosine term contributes nothing, so the integral is π, and the average value of sin2 over a cycle is π/(2π)=1/2.

That number is the whole of alternating current. A mains supply is V(t)=V0sin(ωt), and the power delivered to a resistance is proportional to V2, whose average over a cycle is therefore V02/2. The root mean square voltage, the constant voltage that would deliver the same power, is V0/2. European mains is quoted as 230 V RMS, so the actual peak is 2302=325 V, which is what the insulation has to withstand. The factor of 2 comes from an integral of sin2 and nowhere else.

Where the techniques stop

Now the honest part. Consider these four integrands:

e-x2sinxx1lnx1+x4

Each is continuous on a suitable interval, so by the first half of the Fundamental Theorem each has an antiderivative. None of those antiderivatives can be written using powers, roots, exponentials, logarithms and trigonometric functions, in any finite combination.

This is not a confession of ignorance. Joseph Liouville proved in the 1830s that such functions have no elementary antiderivative, and the modern form of the result, with an algorithm that decides the question for a large class of integrands, is due to Robert Risch in 1968. The statement is a theorem about what is impossible, in the same family as the impossibility of trisecting an angle with straightedge and compass.

The consequence is that most integrands met in physics and statistics cannot be done in closed form, which is why the first of them is given the name erf and tabulated, and why the second is called the sine integral and tabulated. Naming a function is what mathematics does when it cannot express one in older terms, and the logarithm itself was once such a case.

Doing it numerically

When there is no antiderivative, the integral is still a number and it can still be computed, by going back to the sums the definition was built from and choosing them cleverly.

The trapezium rule replaces each strip's flat top with a straight line joining the curve at both ends, which amounts to averaging the left and right sums. The Simpson rule fits a parabola through each consecutive triple of points, giving

abfh3[f0+4f1+2f2+4f3++fn]

with an even number of strips of width h, alternating coefficients of 4 and 2 between the two end values. The pattern comes from integrating the fitted parabolas exactly and adding the results.

The difference in accuracy is dramatic. The error of the trapezium rule falls like h2, so halving the strip width quarters it, while Simpson's falls like h4, so halving the width divides the error by sixteen.

Example. Estimate 01e-x2dx with Simpson's rule using four strips.

The width is h=0.25 and the five values of e-x2 are 1, 0.939413, 0.778801, 0.569783 and 0.367879. The weighted sum is 1+4(0.939413)+2(0.778801)+4(0.569783)+0.367879=8.962265, and multiplying by h/3=0.083333 gives 0.746855. The true value, to seven places, is 0.746824, so four parabolic strips give four correct digits.

Now you. Estimate the same integral with the trapezium rule using four strips, and compare the errors.

Answer

The trapezium rule takes half of each end value plus all the interior ones, times h: 0.25×[0.5(1)+0.939413+0.778801+0.569783+0.5(0.367879)]=0.742984. The error is 0.0038, more than a hundred times Simpson's error of 0.000031, from the same five function evaluations.

A working strategy

Faced with an integral, the order that wastes least time is: check whether it is already a standard form; look for an inside function whose derivative is present, which means substitution; look for a product of two unlike things, which means parts; check whether it is rational, which means partial fractions; try an identity if it is trigonometric. If none of that works within a few minutes, consider that it may have no elementary antiderivative, and reach for a numerical method or a table.

That is a strategy rather than an algorithm, and it should feel less satisfying than differentiation. It is the accurate picture of the subject, and it is why computer algebra systems, which implement the Risch algorithm, are genuinely useful here in a way they are not for differentiation.

With the techniques in hand, the remaining question is what integrals are for. Area was the motivating case and is close to the least of it: the next lesson shows the same limit of sums computing volumes, work, escape velocity, averages and centres of mass, and the pattern that makes all of them the same calculation.