# Indefinite Integral Question - What kind of substitution?

I've been trying to solve this integral for the past two hours, but haven't gotten anywhere:

$$\int \frac {dx}{2\sqrt{x-4}+x}$$

I've tried various kinds of substitutions to no avail. Even just a prod in the right direction would be very helpful.

-
Try the "rationalizing substitution" $\ u^2 \ = \ x - 4 \ \ , \ \ 2u \ du \ = \ dx \ .$ The quadratic polynomial in the denominator will be irreducible, so you will have to follow with "completing the square". The anti-derivative function will involve logarithmic and arctangent terms, more'n'likely... – RecklessReckoner Mar 25 '14 at 22:24
That's one ugly integral. The solution is disgusting. – Shahar Mar 25 '14 at 22:27
@Shahar You'll see worse... much worse... ;) – RecklessReckoner Mar 25 '14 at 22:29

Your best best is to start with the substitution $x-4=u^2$ to get
$$\int{2u\,du\over2u+(u^2+4)}=\int{2(u+1)-2\over(u+1)^2+3}du$$
I found the logarithm (ln|x+2sqrt(x-4)|/2), but I'm having a bit of trouble getting to the arctangent. I know that the identity for arctan is 1/(1+x^2), but whenever I try to take that from: $$\int \frac {1}{(u+1)^2 +3}$$ I get something wrong. I'm trying to factor out the 1, so what I have looks like: $$\frac 13 \int \frac {1}{(\frac{u+1} {\sqrt3} )^2 +1}$$ So I get: $$\frac{arctan( \frac {u+1}{\sqrt3}^2)}{3}$$ (I've factored out the -2 in the numerator) What am I doing wrong? – user3361007 Mar 25 '14 at 23:02
The remaining substitution is $\ v \ = \ \frac{u+1}{\sqrt{3}} \ \ , \ \ \sqrt{3} \ dv \ = \ du \ .$ So you are close, but should have $\ \frac{\arctan v}{\sqrt{3}} \ .$ Incidentally, in your logarithmic term, the denominator of "2" gets written as a term " $\ - \ln 2 \$ ", which is then "swallowed" by the arbitrary constant of the indefinite integral. (That's why you won't see it in a textbook or online-solver's answer.) – RecklessReckoner Mar 25 '14 at 23:19