This can be done with partial fractions, but this will be done with a trigonometric substitution.
First, we need to add dxdx to the integral:
I=int1/(x^2-4)dxI=∫1x2−4dx
Recall that sec^2theta-1=tan^2thetasec2θ−1=tan2θ.
Because of that identity, let x=2secthetax=2secθ.
Importantly, this implies that x^2-4=4sec^2theta-4=4(sec^2theta-1)=4tan^2thetax2−4=4sec2θ−4=4(sec2θ−1)=4tan2θ.
Furthermore, dx=2secthetatanthetad thetadx=2secθtanθdθ.
Then:
I=int(2secthetatantheta)/(4tan^2theta)d theta=1/2intsectheta/tanthetad theta=1/2intcscthetad thetaI=∫2secθtanθ4tan2θdθ=12∫secθtanθdθ=12∫cscθdθ
Which is a commonly known integral:
I=-1/2lnabs(csctheta+cottheta)I=−12ln|cscθ+cotθ|
From our original substitution x=2secthetax=2secθ we see that sectheta=x/2secθ=x2. This is a right triangle where 22 is the side adjacent to thetaθ, xx is the hypotenuse and then the side opposite theta is sqrt(4-x^2)√4−x2.
Then, csctheta=x/sqrt(4-x^2)cscθ=x√4−x2 and cottheta=2/sqrt(4-x^2)cotθ=2√4−x2. So:
I=-1/2lnabs(x/sqrt(4-x^2)+2/sqrt(4-x^2))=1/2lnabs(sqrt(4-x^2)/(x+2))I=−12ln∣∣∣x√4−x2+2√4−x2∣∣∣=12ln∣∣∣√4−x2x+2∣∣∣
Expanding further:
I=1/4lnabs(4-x^2)-1/2lnabs(x+2)=1/4lnabs(2+x)+1/4lnabs(2-x)-1/2lnabs(x+2)I=14ln∣∣4−x2∣∣−12ln|x+2|=14ln|2+x|+14ln|2−x|−12ln|x+2|
I=1/4lnabs(2-x)-1/4lnabs(x+2)I=14ln|2−x|−14ln|x+2|
We can combine these and switch the order of 2-x2−x to x-2x−2 since we're working with absolute values:
I=1/4lnabs((x-2)/(x+2))+CI=14ln∣∣∣x−2x+2∣∣∣+C
This would be much quicker if done with partial fractions.