# Please integrate $\int \frac{\sqrt{x}}{\sqrt{x} + \sqrt{a-x}} \, dx$

Evaluate the following integral
$$\int \frac{\sqrt{x}}{\sqrt{x} + \sqrt{a-x}} \, dx$$
I just can’t seems to know what to do I have tried squaring out but it only gets worse.

#### Solutions Collecting From Web of "Please integrate $\int \frac{\sqrt{x}}{\sqrt{x} + \sqrt{a-x}} \, dx$"

Decompose the integrand:
$$\frac{\sqrt{x}}{\sqrt{a-x}+\sqrt{x}} = \frac{1}{2} + \frac{a}{2 (2 x-a)}- \frac{\sqrt{x(a-x)}}{2 x-a}$$
You will find
$$\int \frac{1}{(2 x-a)} \, dx = \frac{1}{2} \ln \left( 2x – a \right)$$
and
$$\int \frac{\sqrt{x(a-x)}}{2 x-a} \, dx = \frac{1}{2} \sqrt{x(a-x)}-\frac{1}{2} a \tanh ^{-1}\left(\frac{\sqrt{x}}{\sqrt{a-x}}\right)$$

When successful, you will have

$$\int \frac{\sqrt{x}}{\sqrt{a-x}+\sqrt{x}} \, dx = \frac{1}{4} \left(2 x -2 \sqrt{x(a-x)}+a \ln (2 x-a)+2 a \tanh ^{-1}\left(\frac{\sqrt{x}}{\sqrt{a-x}}\right)\right)$$