# 8. Integration by Trigonometric Substitution

by M. Bourne

In this section, we see how to integrate expressions like

`int(dx)/((x^2+9)^(3//2))`

Depending on the function we need to integrate, we **substitute** one of the following trigonometric expressions to simplify the integration:

For `sqrt(a^2-x^2)`, use ` x =a sin theta`

For `sqrt(a^2+x^2)`, use ` x=a tan theta`

For `sqrt(x^2-a^2)`, use `x=a sec theta`

After we use these substitutions we'll get an integral that is "do-able".

Take note that we are not integrating trigonometric expressions (like we did earlier in Integration: The Basic Trigonometric Forms and Integrating Other Trigonometric Forms and Integrating Inverse Trigonometric Forms.

Rather, on this page, we substitute a sine, tangent or secant expression in order to make an integral possible.

### Example 1

`int(dx)/((x^2+9)^(3//2))`

Answer

We can write the question as `int(dx)/((3^2+x^2)^(3//2))`

It's now in the form of the second substitution suggestion given above, that is:

For `sqrt(a^2+x^2)`, use `x=a tan theta`,

with `a=3`.

So we'll put `x=3 tan theta` and this gives `dx=3 sec^2 theta d theta`

We make the first substitution and simplify the denominator of the question before proceeding to integrate.

We'll need to use the following:

`(a^2)^(3//2) = a^3`.

Here's a number example demonstrating this expression:

`9^(3//2) = (sqrt9)^3 = 3^3 = 27`

This is a well-known trigonometric identity:

`tan^2 θ + 1 = sec^2 θ`

So we have:

`(x^2+9)^(3//2)=((3 tan theta)^2+9)^(3//2)`

`=(9 tan^2 theta+9)^(3//2)`

`=(9[tan^2 theta+1])^(3//2)`

`=9^(3//2)[tan^2 theta+1]^(3//2)`

`=27[sec^2 theta]^(3//2)`

`=27[sec theta]^3`

`=27 sec^3 theta`

Now, substituting

`dx=3 sec^2 theta d theta`

and

`(x^2+9)^(3//2)=27 sec^3 theta`

into the given integral gives us:

`int(dx)/((x^2+9)^(3//2))=int(3 sec^2 theta d theta)/(27 sec^3 theta)`

`=1/9int(d theta)/(sec theta)`

`=1/9int cos theta d theta`

`=1/9 sin theta+K`

We now need to get our answer in terms of *x* (since the question was in terms of *x*).

Since we let `x = 3 tan θ`, we get

`tan theta=x/3`

and we can draw a triangle to find the expression for `sin θ` in terms of `x`:`

From the triangle we see that

`sin theta=x/sqrt(x^2+9)`

Therefore, we can conclude that the answer for our integral is `1/9` times this last expression.:

`int(dx)/((x^2+9)^(3//2))=1/9sin theta+K`

`=1/9(x/(sqrt(x^2+9)))+K`

`=x/(9sqrt(x^2+9))+K`

### Example 2

`int_4^5(sqrt(x^2-16))/(x^2)dx`

Answer

`int_4^5(sqrt(x^2-16))/x^2 dx`

This question contains a square root which is in the form of the 3rd substitution suggestion given at the top, that is:

For `sqrt(x^2-a^2)`, use `x=a sec theta`

So we have `a=4` and we let

`x = 4 sec θ`

and this gives

`x^2= 16 sec^2 θ`

and

`dx = 4 sec θ tan θ d θ`

Simplifying the square root part:

`sqrt(x^2-16) =sqrt(16 sec^2 theta-16)`

`=sqrt(16(sec^2theta-1))`

`=sqrt16sqrt(tan^2theta)`

`=4 tan theta`

Substituting

`dx = 4 sec theta tan theta d theta,`

`x^2= 16 sec^2 theta` and

`sqrt(x^2-16)=4 tan theta`

into the given integral gives us the following. (We take the indefinite case first and then do the substitution of upper and lower limits later, to make the writing a bit easier.)

`int(sqrt(x^2-16))/x^2dx =int((4 tan theta))/(16 sec^2 theta)(4 sec theta tan theta) d theta`

`=int(16 tan^2 theta sec theta)/(16 sec^2 theta) d theta`

`=int(tan^2 theta)/(sec theta) d theta`

`=int(sec^2theta-1)/(sec theta) d theta`

`=int((sec^2 theta)/(sec theta)-1/(sec theta)) d theta`

`=int (sec theta-cos theta) d theta`

`=[ln |sec theta+tan theta|-sin theta]+K`

Now, our question was a definite integral, so we need to either re-express our answer in terms of the original variable , `x`, or we could work it using `theta`.

#### Changing back to `x`

Earlier, we let `x = 4 sec θ`, so we get `sec theta=x/4` (or `cos theta = 4/x`).

We draw an appropriate triangle like we did earlier:

Triangle to find `sin theta` and `tan theta` in terms of `x`.

We can see that:

`tan theta=(sqrt(x^2-16))/4`

and

`sin theta=(sqrt(x^2-16))/x`

Therefore, we can conclude that:

`int_4^5(sqrt(x^2-16))/x^2 dx =[ln|sec theta+tan theta|-sin theta]_(theta=?)^(theta=?)`

`=[ln|x/4+(sqrt(x^2-16))/4|` `{:-(sqrt(x^2-16))/x]_4^5`

`=[ln|5/4+3/4|-3/5]-[ln|1+0|-0]`

`=[ln|2|-3/5]-[0]`

`=0.09315`

(I've put `theta=?` as the upper and lower limits in the first line above because we don't know those limits in terms of `theta`, and we don't need to calculate them since we revert to `x` as our variable.)

#### Leaving it in terms of `theta`

Since `sec theta=x/4`, then as `x` ranges from `4` to `5`, then `sec theta` will range from `1` to `1.25`.

So the required upper and lower limits for `theta` (these are the missing question mark "`theta=?`" values in the above answer) will be

`theta="arcsec"(1)= 0`

and

`theta="arcsec"(1.25)=0.6435011`

Returning to our answer in `theta`, and substituting our upper and lower values gives:

`[ln |sec theta+tan theta|-sin theta]_(theta=0)^(theta=0.6435011)`

`=[ln |sec 0.6435011+tan 0.6435011|` `{:-sin 0.6435011]` `-[ln |sec 0+tan 0|-sin 0]`

`=0.09315`, which is the same as our earlier answer.

In this example, both approaches (leaving it in terms of `theta` or changing back to `x`) is about the same amount of work.

Please support IntMath!

## Exercises

Integrate each of the given functions:

**1.** `intsqrt(16-x^2)dx`

Answer

`intsqrt(16-x^2) dx`

This question is in the form of the first substitution suggestion in this section, that is,

For `sqrt(a^2-x^2)`, use ` x =a sin theta`

So we have `a=4`, `x= 4 sin θ`, and `dx = 4 cos θ dθ`.

Substituting and simplifying the square root part first:

`sqrt(16-x^2) =sqrt(16-16 sin^2 theta)`

`=sqrt(16(1-sin^2 theta))`

`=4sqrt(cos^2 theta)`

`=4 cos theta`

Substituting into the integral gives:

`intsqrt(16-x^2) dx =int4 cos theta(4 cos theta d theta) `

` =int16 cos^2 theta d theta`

`=16int1/2(cos 2 theta+1)d theta`

`=8int(cos 2 theta+1)d theta`

`=8(1/2sin 2 theta+theta)+K`

`=8(sin theta cos theta + theta)+K`

`=8(x/4(sqrt(16-x^2))/4+arcsin {:x/4:})+K`

`=(xsqrt(16-x^2))/2+8 arcsin{:x/4:}+K`

The second-last step comes from drawing a triangle, using `sin theta = x/4` in this case, as follows:

Triangle to find `theta`, `sin theta` and `cos theta` in terms of `x`.

Quite often we can get different forms of the same final answer! That is, math software (or another human) can produce an answer which is actually correct, but in a different formto the one given here since. If this happens, don't panic! Just check your solution perhaps by substituting various values for `x`, or (better), drawing the graph using software.

Easy to understand math videos:

MathTutorDVD.com

**2.** `int(3 dx)/(xsqrt(4-x^2))`

Answer

`int(3 dx)/(xsqrt(4-x^2))`

This contains a `sqrt(a^2-x^2)` term, so we will use a substitution of `x =a sin theta`.

So `a=2`, and we let `x = 2 sin θ`, so `dx = 2 cos θ dθ`.

Substituting and simplifying the square root gives:

`sqrt(4-x^2) =sqrt(4-4 sin^2 theta)`

`=sqrt(4(1-sin^2 theta))`

`=2sqrt(cos^2 theta)`

`=2 cos theta`

This time our triangle will use `sin theta = x/2`, as follows:

Triangle to find `csc theta` and `cot theta` in terms of `x`.

Substituting everything into the integral gives:

`int(3 dx)/(xsqrt(4-x^2)) = int(3(2 cos theta\ d theta))/((2 sin theta)(2 cos theta))`

`=3/2int(d theta)/(sin theta)`

`=3/2intcsc theta d theta`

`=3/2ln |csc theta-cot theta|+K`

`=3/2ln |2/x-(sqrt(4-x^2))/x|+K`

`=3/2ln|(2-sqrt(4-x^2))/x|+K`

Easy to understand math videos:

MathTutorDVD.com

**3.** `int(dx)/(sqrt(x^2+2x))`

Answer

`int(dx)/(sqrt(x^2+2x))`

Firstly, note that

`x^2+2x=(x+1)^2-1`

If we put `u = x + 1`, then `du = dx` and our integral becomes:

`int(dx)/(sqrt(x^2+2x))=int(du)/(sqrt(u^2-1))`

Now, we use `u = sec θ` and so `du = sec θ tan θ dθ`

The square root becomes:

`sqrt(u^2-1)` `=sqrt(sec^2theta-1)` `=sqrt(tan^2 theta)` `=tan theta`

The triangle in this case starts with `x+1=sec theta` (that is, `cos theta = 1/(x+1)`), and is as follows:

Triangle to find `sec theta` and `tan theta` in terms of `x`.

Returning to our integral, we have:

`int(dx)/(sqrt(x^2+2x)) =int(du)/(sqrt(u^2-1))`

`=int(sec theta tan theta d theta)/(tan theta)`

`=int sec theta d theta`

`=ln |sec theta+tan theta|+K`

`=ln |x+1+sqrt(x^2+2x)|+K`

### Search IntMath, blog and Forum

### Online Algebra Solver

This algebra solver can solve a wide range of math problems.

Go to: Online algebra solver

### Calculus Lessons on DVD

Math videos by MathTutorDVD.com

Easy to understand calculus lessons on DVD. See samples before you commit.

More info: Calculus videos

### The IntMath Newsletter

Sign up for the free **IntMath Newsletter**. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!