Hi everyone! We’ve already seen this integration technique in Lesson 6 (link here). Today we’ll add another layer so that we can apply this technique in more examples.

Lesson 7: Trigonometric Substitution (part 2)

Learning goals:

  • Solve integration problems involving a quadratic polynomial or the square root of a quadratic polynomial.



  • Integration – Trigonometric Substitution

Motivating question

How can we use trigonometric substitution to evaluate integrals like

\[\int \frac{1}{x^2+2x+5}dx?\]

Warmup exercise 1

Rewrite the expression $x^2 + 2x +5$ in the form $(x-h)^2 \pm k^2$ (that is, determine what $h$ and $k$ should be and determine what the sign should be so that the new expression is a sum or difference of squares).

Hint: this is an algebra question, not a calculus question, so you just have to remember the appropriate algebra technique.

Answer 1

The algebra technique we need to use is called completing the square. Because the coefficient on the quadratic term $x^2$ is $1$, we don’t have to factor before completing the square. To complete the square we need to find the magic number $?$ to add and subtract from the given expression:

\[x^2 + 2x +5 = x^2 + 2x +? – ? + 5.\]

since our original expression is of the form $x^2 + bx+c$, the magic number $?$ is equal to $(\frac{b}{2})^2$. So our magic number is $(\frac{2}{2})^2 = 1$:

\[x^2 + 2x +5 = x^2 + 2x +1 – 1 + 5 = (x+1)^2 +4.\]

If this were an average completing-the-square question, we’d be done, but notice that the question asks us to rewrite the expression as a sum or difference of squares, so we need to rewrite the constant term as a square as well:

\[(x+1)^2 +4 = (x+1)^2 +2^2.\]

This last expression is our final answer; we see that $h = 1$, $k=2$, and that the sign is positive.

Algebra refresher: completing the square

This algebra technique is the only new thing we’re introducing in this lesson. If you need a refresher on completing the square, you can watch the following videos.

  • The video linked here introduces the concept of completing the square.
  • The vides linked here, here, and here show a handful of examples of different types.

Don’t forget: if you’re completing the square for a quadratic expression where the coefficient on the quadratic term is not $1$, you’ll have to factor it out from the quadratic and linear terms first and then complete the square inside the parentheses:

\[ax^2 + bx + c = a(x^2 + \frac{b}{a}x) +c.\]

Trigonometric substitution with linear terms–examples

Now we’re ready to get back to evaluating integrals. In all of these examples, the goal is to apply trigonometric substitution, but to know which substitution to make, we must recognize the relevant factors as sums or differences of squares $a^2-x^2$, $x^2-a^2$, or $x^2+a^2$.

Exercise 2


\[\int \frac{dx}{\sqrt{x^2+6x}}\]

Answer 2

See Video 1 below for a worked solution.

Video 1

Header text

Header text

Exercise 3



Answer 3

See Video 2 below for a worked solution.

Video 2


The technique of trigonometric substitution can be applied to some integrals even when they don’t appear to fit the structure of Lesson 6 (link here). The integrand can be prepared for trig substitution by completing the square and potentially forming another (non-trigonometric) substitution first. Sometimes after performing a trig substitution we’ll be left with an integral we can evaluate directly but sometimes we’ll have to apply another technique from our toolbox.


Additional Video Resources

Trigonometric Substitution

Exit Ticket


\[\int \frac{1}{x^2+2x+5}dx\]