Integral Calculus, Integration by Trig Substitution

Integration by Trig Substitution

The formula for the area of the partial circle is an example of integration by trig substitution, where x is replaced with an appropriate trig function of θ. This is typical when the integrand contains 1±x2, or the square root thereof, in the numerator or denominator. Let's try a fewe examples.

1 over 1-x2

Let's compute the integral of 1 over 1-x2. We already know the integral of the square root of this function; it is arcsine of x, by definition. This time there is no square root.

Let x = sin(θ), hence the denominator becomes cosine squared. Bring in another cosine for the derivative of sine, and the integrand is 1/cos(θ), or sec(θ). Somebody discovered that the integral of secant is log(secant+tangent). This is interesting in its own right; stop and verify it by differentiation.

Ok, you're back. Let's translate back to x. If x is the sine of θ, what is the secant? Draw a right triangle with hypotenuse 1, altitude x, and base sqrt(1-x2). Thus x = sin(θ). The secant is the hypotenuse over the base, or 1 over sqrt(1-x2). Similarly, the tangent is x/sqrt(1-x2). Thus the integral, in terms of x, is log((x+1)/sqrt(1-x2)). This can be simplified as follows.

log( (x+1) / sqrt(1-x2) ) =

log( sqrt((1+x)2) / sqrt(1-x2) ) =

log( sqrt( (1+x)2 / (1-x2) ) ) =

½ log( (1+x)2 / (1-x2) ) =

½ log( (1+x) / (1-x) ) =

½ ( log(1+x) - log(1-x) )

Note that the area goes to infinity as x approaches ±1. This was not the case when we integrated the square root of 1 over 1-x2.

1 over 1+x2

Next, integrate 1 over 1+x2. Let x = tan(θ), and note that tangent squared + 1 = secant squared. The derivative of tangent is also secant squared, so the integrand becomes 1. The integral is θ, or atan(x), and the area under the curve, from -∞ to +∞, is π.

1 over sqrt(1+x2)

Consider 1 over sqrt(1+x2), the square root of the previous integrand. Again, set x = tan(θ), giving secant on the bottom and secant squared on top. We need the integral of secant, and as described earlier, this is log(secant+tangent). We already know what tan(θ) is; it's x. Draw a right triangle to find sec(θ). If the tangent is x, the base is 1 and the altitude is x. The hypotenuse is sqrt(1+x2). The secant is the same as the hypotenuse, and the integral becomes log(sqrt(1+x2)+x).

1 over sqrt(x2-1)

If the denominator is x2-1, that's the opposite of 1-x2, a case we've handled before. But if it is the square root of x2-1, that's something new. Set x = sec(θ), whence the denominator simplifies to tan(θ). The derivative of secant is secant×tangent, so the integrand is secant, and once again the integral is log(sec(θ)+tan(θ)). Translating back to x, the integral is log(x+sqrt(x2-1)).

sqrt(x2+1)

Here we move the quadratic to the numerator. We've already done the square root of 1-x2. That gave the area of the unit circle. So consider the square root of x2+1.

Set x = tan(θ), and the integral becomes sec3(θ). We need to integrate secant cubed, but how do we do that?

Let f be the integral of secant cubed, whatever that turns out to be. Now integration by parts points you in the right direction. Make an educated guess, f = secant*tangent + something else. The derivative of f produces secant cubed, as it should, but it also produces secant tangent squared, which we don't want. We must subtract the integral of this "extra stuff" from secant×tangent. The new integrand can be written as sine squared over cosine cubed. Replace the numerator with 1-cosine squared. Thus we need to subtract the integral of secant cubed - secant. But aha, the first term is simply f, so move it to the left hand side, giving 2f. And we certainly know the integral of secant by now. Put it all together to get the integral in terms of θ, and then in terms of x.

sec(θ)×tan(θ) + log(sec(θ)+tan(θ) over 2

x×sqrt(x2+1) + log(x+sqrt(x2+1)) over 2

sqrt(x2-1)

Finally consider sqrt(x2-1). This is only defined for x beyond ±1. Set x = sec(θ), whence the integral becomes sec(θ)×tan(θ)2. Write this as sine squared over cosine cubed. Remember that sine squared is 1 - cosine squared. Thus we have the difference of two terms, secant cubed - secant. By now we know the integral of secant, and the integral of secant cubed was presented in the previous example. Put it all together to get the integral, in terms of θ, and then in terms of x.

sec(θ)×tan(θ) - log(sec(θ)+tan(θ) over 2

x×sqrt(x2-1) - log(x+sqrt(x2-1) over 2

Linear Changes to x in the Quadratic

We can generalize the quadratic in all of the above examples. For instance, you wish to integrate 1 over x2+4x+13. Replace x with u-2, giving a denominator of u2+9. Then replace u with 3v, giving 9×(v2+1), along with a factor of 3 on top for the derivative of 3v. Thus the integral is atan(v)/3, or, atan((x+2)/3)/3. This "complet the square and scale" operation can be done for any quadratic, inside or outside of the square root.

Another interesting integrand has a linear term on top and a quadratic down below. Consider 7x over 2x2+3x+5. This looks a little like f′ over f, and whenever you see that, you should think log(f). Start with (7/4)×log(2x2+3x+5). This gives us what we want, plus some extra stuff, namely 21 over 8x2+12x+20. We need to integrate this and take it away, but we know how to do that, thanks to the previous paragraph.

Using similar reasoning, a linear term times or divided by the square root of a quadratic can also be integrated. Think of the quadratic as f, hence the linear term is f′. The integrand looks like f′ times f to the ½ power, or perhaps f to the -½ power when the quadratic is in the denominator. The integral is based on f raised to the 3/2 or 1/2 power, and we know how to clear away the "extra stuff".