Completing the Square Completing the Square
Introduction
We need to review some properties of trig functions for integration.
Memorize all of this information.
Trig Identities
\begin{align}
\sin^2(x) &&+ &\cos^2(x) &&= 1 \\
\tan^2(x) &&+ &1 &&= \sec^2(x) \\
1 &&+ &\cot^2(x) &&= \csc^2(x)
\end{align}
(2) and (3) are easily derived from (1).
(2) is derived by dividing (1) by \cos^2(x)
(3) is derived by dividing (1) by \sin^2(x)
. Derivatives of Trig Functions
\begin{align}
f(x) &= \sin(x) &f'(x) &= \cos(x) \\
f(x) &= \cos(x) &f'(x) &= -\sin(x) \\
f(x) &= \tan(x) &f'(x) &= \sec^2(x) \\
f(x) &= \csc(x) &f'(x) &= -\csc(x)\cot(x) \\
f(x) &= \sec(x) &f'(x) &= \sec(x)\tan(x) \\
f(x) &= \cot(x) &f'(x) &= -\csc^2(x)
\end{align}
If you know the derivatives of (1) and (2), you can solve for the rest.
Derivatives of Inverse Trig Functions
\begin{align}
f(x) &= \arcsin(x) &f'(x) &= \frac{1}{\sqrt{1-x^2}} \\
f(x) &= \arccos(x) &f'(x) &= -\frac{1}{\sqrt{1-x^2}} \\
f(x) &= \arctan(x) &f'(x) &= \frac{1}{1+x^2} \\
f(x) &= \text{arccsc}(x) &f'(x) &= -\frac{1}{|x|\sqrt{x^2-1}} \\
f(x) &= \text{arcsec}(x) &f'(x) &= \frac{1}{|x|\sqrt{x^2-1}} \\
f(x) &= \text{arccot}(x) &f'(x) &= -\frac{1}{1+x^2}
\end{align}
If you know the trig identities and the derivatives of
\sin(x)
and
\cos(x)
, and you can derive inverse functions, you can solve these. However, they are worth memorizing.
Completing the Square
Completing the Square is a method to rewrite quadratic equations:
x^2 + bx + c = (x + \frac{b}{2})^2 - \frac{b^2}{4} + c
This is very straightforward in practice. Here is an example of completing the square:
\begin{align*}
x^2 + 4x - 5 &= (x + 2) + d \\
&= x^2 + 4x + 4 + d \\
&= (x + 2)^2 - 9
\end{align*}
Completing the square is useful for the integration of functions of the following form:
\int \frac{1}{x^2 + bx + c}dx
As they can be rewritten as:
\begin{align*}
\int \frac{1}{(x + e)^2 + d^2}dx &= \frac{1}{d}\arctan(\frac{x + e}{d}) + C \\\\
\int \frac{1}{(x + e)^2 - d^2}dx &= \frac{1}{2d}\ln|\frac{x + e}{x - e}| + C
\end{align*}
Examples
1.
\begin{align*}
\int \frac{1}{x^2 + 4x + 6} \, dx &= \int \frac{1}{(x+2)^2 + 2} \, dx \\\\
&= \int \frac{1}{(x+2)^2 - \sqrt{2}^2} \, dx \\\\
&= \frac{1}{\sqrt{2}}\arctan(\frac{x+2}{\sqrt{2}}) + C
\end{align*}
2.
\begin{align*}
\int \frac{1}{x^2 + 4x - 5} \, dx &= \int \frac{1}{(x+2)^2 - 9} \, dx \\\\
&= \int \frac{1}{(x+2)^2 - 3^2} \, dx \\\\
&= \frac{1}{6}\ln|\frac{x+2}{x-2}| + C
\end{align*}