Integral question: $\displaystyle\int \frac{x^{n-2}}{(1 + x)^n} {\rm d}x$ How would one integrate the following? 
$$\int \frac{x^{n-2}}{(1 + x)^n} {\rm d}x~$$ where $n$ is a positive integer.
 A: $$\int {x^{n-2} \over (1+x)^n} {\rm d} x = \int (1+x)^{-2} \left({x \over 1+x}\right)^{n-2} {\rm d} x =\int y^{n-2} {\rm d} y$$
using the substitution $y = {x \over 1 + x}$.
A: For me, the most natural way to begin is by letting $t=1+x$. Then the integral becomes
$$
\int \frac{(t-1)^{n-2}}{t^n} dt = \int \left(1 - \frac{1}{t} \right)^{n-2} \frac{dt}{t^2}.
$$
Then let $y=1/t$. Or maybe even better: $y=1-1/t$, which brings you back to Marek's answer.
If you would have had some other powers that didn't interact as nicely as $n-2$ and $n$, say $(t-1)^a/t^b$, you could have expanded using the binomial theorem and integrated term by term.
A: I would like to do it with the following hint:
$$\int\frac{x^{n-2}}{(1+x)^n}dx=\int\frac{x^{n-2}}{(1+x)^2(1+x)^{n-2}}dx=\int\frac{1}{(1+x)^2}(1-\frac{1}{1+x})^{n-2}dx$$
A: My first instinct would have been to substitute $x = \tan^2(\theta)$.
$$I = \int \frac{x^{n-2}}{(1 + x)^n} {\rm d}x$$
$x = \tan^2(\theta)$.
\begin{align}
I & = \int \dfrac{\tan^{2n-4}}{\sec^{2n}(\theta)} 2 \tan(\theta) \sec^2(\theta) d \theta\\
& = 2 \int \dfrac{\tan^{2n-3}}{\sec^{2n-2}(\theta)} d \theta\\
& = 2 \int \sin^{2n-3}(\theta)\cos(\theta) d \theta
\end{align}
Setting $\sin(\theta) = t$, we get
$$I = 2 \int t^{2n-3} dt = 2 \dfrac{t^{2n-2}}{2n-2} + C = \dfrac{(\sin^2(\theta))^{n-1}}{n-1} + C = \dfrac1{n-1} \left(\dfrac{x}{1+x} \right)^{n-1} + C$$
This is just a round about way of doing what Marek did. But I would not have realized immediately to split it in such a nice way as Marek had done.
