Answer
$$\int\frac{1}{x^2-9}dx=\frac{1}{6}\ln|x-3|-\frac{1}{6}\ln|x+3|+c$$
Work Step by Step
We will factor the denominator:
$$\int\frac{1}{x^2-9}dx=\int\frac{1}{(x-3)(x+3)}dx$$
Now we will use partial fractions method. First we will decompose into partial fractions:
$$\frac{1}{(x-3)(x+3)}=\frac{A}{x-3}+\frac{B}{x+3}.$$
We will find $A,B$ following the steps below:
Step 1:Put the fractions on the right side together with the common denominator:
$$\frac{1}{(x-3)(x+3)}=\frac{A}{x-3}+\frac{B}{x+3}=\frac{A(x+3)+B(x-3)}{(x-3)(x+3)}=\frac{Ax+3A+Bx-3B}{x^2-9}=\frac{(A+B)x+3(A-B)}{x^2-9}$$
Step 2: Equate the numerators of the first and the final fraction:
$$1=(A+B)x+3(A-B)$$
Step 3: Equate the coefficients multiplying the same powers of $x$ on the both sides. There is no $x$ on the left so we take its' coefficient to be $0$:
$A+B=0,1=3(A-B)\Rightarrow A=-B$ Putting this into the second equation we get $1=3(A+A)=6A$ which gives us $A=\frac{1}{6}\Rightarrow B=-A=-\frac{1}{6}.$
Go back to solving the integral:
$$\int\frac{1}{(x-3)(x+3)}dx=\int\left(\frac{1}{6}\frac{1}{x-3}-\frac{1}{6}\frac{1}{x+3}\right)dx=\frac{1}{6}\int\frac{dx}{x-3}-\frac{1}{6}\int\frac{dx}{x+3}=\frac{1}{6}\ln|x-3|-\frac{1}{6}\ln|x+3|+c$$