# Evaluate the integral. (Complete the square if necessary) `int 2/(sqrt(-x^2 + 4x)) dx`

To solve this integral first complete the square in the denominator of the integrand giving the integral as

`I = int 2 /sqrt(-(x-2)^2 + 4) dx` `= int 2/ sqrt(4 - (x-2)^2) dx`

Now notice that the integrand is of the basic form

`1/(a^2 - y^2)`

For this type of integrand we use a sine trigonometric substitution

`y = a sin theta`

So here we should use the substitution

`x-2 = 2sin theta` so that `dx = 2cos theta d theta`

Rewriting the integral we have

`I = int (4cos theta)/ sqrt(4 - 4sin^2 theta) d theta = 2 int (cos theta)/sqrt(1-sin^2theta) d theta ` = `2 int (cos theta)/ (cos theta) d theta`

from the trigonometric relation `sin^2 theta + cos^2 theta = 1`

Therefore,

`I = 2 int 1. d theta = theta`

Putting `x-2 = 2sin theta` back in, establish `theta` in terms of `x` :

`theta = 2 sin^(-1) ( x/2 - 1)`

**and therefore, in terms of `x` `I = sin^(-1)(x/2 - 1) + c` **

NB see Example 4 in the reference link below