Integrating $\int \frac{dx}{1+\frac{a}{x}}$ First-year problem: 
How do I integrate

$$ \int \frac{dx}{1+\frac{a}{x}}? $$

My guess is $u$-substitution, or partial fractions, but nothing that I try seems to work...
 A: \begin{align*}
\int\frac{dx}{1+a/x}&=\int\frac{x\,dx}{x+a}\\[1em]
&=\int\left(1-\frac{a}{x+a}\right) dx\\[1em]
&=x-a\ln |x+a|+C
\end{align*}
A: Hint:
$$\frac1{1+\frac ax}=\frac x{x+a}=1-\frac a{x+a}$$
A: Hint Multiply both numerator and denominator by $x$ to rewrite the integral as
$$\int \frac{x \,dx}{x + a}.$$
A: $$\int \frac{dx}{1+\frac{a}{x}}=\int \frac{x}{x+a}dx=\int \left( \frac{x+a}{x+a}-\frac{a}{x+a}\right)dx=\int \left( 1-\frac{a}{x+a}\right)dx$$
Can you continue?
A: Hint:
$$\int \frac{dx}{1+a/x}=\int \frac{x\,dx}{x+a}$$ and set $u=x+a$
A: $$ \int \frac{dx}{1+a/x}=\int \frac {x\,dx}{x+a}\,dx$$ Now let $u = x+a$, $du=dx$ and $x = u-a$. This gives you $$\begin{align}\int \frac{(u-a)\,du}{u} & = \int\left(1 - \frac au\right)\,du\\ & = u - a\ln|u| + C \\ &= (x+a)- a\ln|(x+a)| + C \\ &= x-a\ln|x+a|+c\end{align}$$
A: Simple, just consider :
$$\frac{1}{1+\frac{a}{x}} = \frac{x}{a+x}=\frac{-a + a +x}{a+x} = 1 - \frac{a}{a+x} $$
So the integral is :
\begin{eqnarray}
\int \frac{1}{1+\frac{a}{x}} &=& \int dx - a\int\frac{dx}{a+x}
\\
&=& x - a ln(a+x) 
\end{eqnarray}
A: Obseve that
\begin{equation*}
\int (1-\frac{a}{a+x})dx\\
=-a\int\frac{1}{u}du+\int 1dx
\end{equation*}
by using the substitution $u=a+x.$ Then 
\begin{equation*}
x-a\log(u).
\end{equation*}
Substitute back to get 
\begin{equation*}
x-a\log|a+x|+C.
\end{equation*}
