How does one integrate a function of the form: $\int \frac{x}{(a+x)^2}dx$ How does one integrate a function of the form:
$$\int \frac{x}{(a+x)^2}dx$$
I've considered subbing in for $u$, inverse trig methods, and integrating by parts but I haven't found a solution.
 A: $$
\begin{align*}
\int  \frac { x }{ (a+x)^{ 2 } } dx&=\int  \frac { x+a-a }{ (a+x)^{ 2 } } dx\\&=\int  \frac { d\left( a+x \right)  }{ (a+x) } -a\int { \frac { d\left( a+x \right)  }{ (a+x)^{ 2 } }  }\\&=\ln { \left| a+x \right| +\frac { a }{ a+x }  } +C
\end{align*}
$$
A: Here you can use partial fractions:
If $\displaystyle\frac{x}{(a+x)^2}=\frac{A}{a+x}+\frac{B}{(a+x)^2}$, multiplying by $(a+x)^2$ gives $\;x=A(a+x)+B$, and then
equating the coefficients of $x$ gives $A=1$, and letting $x=-a$ gives $B=-a$.
(This is the standard way to get this, but the previous answer gives a nice way to get the same form.)
Now you can find $\displaystyle\int\left(\frac{1}{a+x}-\frac{a}{(a+x)^2}\right)dx$.

Alternatively, using integration by parts with $u=x, du=dx$ and $\displaystyle dv=\frac{1}{(a+x)^2}, v=-\frac{1}{a+x}$
gives $\displaystyle -\frac{x}{a+x}-\int-\frac{1}{a+x}dx=-\frac{x}{a+x}+\ln|a+x|+C$

As pointed out in the comments, the substitution $u=x+a$, so $x=u-a$ and $du=dx$,
is also a good way to find this integral.
